You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at org.jsonschema2pojo.util.NameHelper.normalizeName(NameHelper.java:45)
at org.jsonschema2pojo.util.NameHelper.getPropertyName(NameHelper.java:74)
at org.jsonschema2pojo.rules.RequiredArrayRule.apply(RequiredArrayRule.java:54)
at org.jsonschema2pojo.rules.RequiredArrayRule.apply(RequiredArrayRule.java:39)
at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:134)
at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:64)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:85)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:35)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
at org.jsonschema2pojo.SchemaMapper.generate(SchemaMapper.java:88)
at org.jsonschema2pojo.Jsonschema2Pojo.generateRecursive(Jsonschema2Pojo.java:116)
at org.jsonschema2pojo.Jsonschema2Pojo.generateRecursive(Jsonschema2Pojo.java:118)
at org.jsonschema2pojo.Jsonschema2Pojo.generate(Jsonschema2Pojo.java:74)
at org.jsonschema2pojo.maven.Jsonschema2PojoMojo.execute(Jsonschema2PojoMojo.java:494)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
Notes:
I upgraded my pom to use the latest maven plugin version (0.4.34) from 0.4.7 and the error started showing up. I narrowed it down to 0.4.12 works fine but then fails in version 0.4.13.
Yes, required[""] is pointless, I inherited the schema and don't know the history behind it. The easy workaround is simply removing the "required" and everything is fine.
Thanks,
Rich
The text was updated successfully, but these errors were encountered:
joelittlejohn
changed the title
maven plugin: schema with required[""] results in String index out of range: 0
Schema with required[""] results in String index out of range: 0
May 30, 2017
Example file:
maven plugin error:
Notes:
I upgraded my pom to use the latest maven plugin version (0.4.34) from 0.4.7 and the error started showing up. I narrowed it down to 0.4.12 works fine but then fails in version 0.4.13.
Yes, required[""] is pointless, I inherited the schema and don't know the history behind it. The easy workaround is simply removing the "required" and everything is fine.
Thanks,
Rich
The text was updated successfully, but these errors were encountered: