within this commit logging of ClassAlreadyExistsException was added to EnumRule.java. This makes it inconsistent with other *Rule.java clasess. For instance ObjectRule.java does not do it (see here).
I am not sure if such logging of ClassAlreadyExistsException is desired but suddenly getting following errors only for enums after upgrade is quite confusing:
[INFO] --- jsonschema2pojo:1.2.1:generate (default) @ my-module ---
[ERROR] Could not create enum.
org.jsonschema2pojo.exception.ClassAlreadyExistsException: com.my.package.MyEnum
at org.jsonschema2pojo.rules.EnumRule.createEnum (EnumRule.java:349)
at org.jsonschema2pojo.rules.EnumRule.apply (EnumRule.java:116)
at org.jsonschema2pojo.rules.EnumRule.apply (EnumRule.java:68)
at org.jsonschema2pojo.rules.SchemaRule.apply (SchemaRule.java:81)
at org.jsonschema2pojo.rules.SchemaRule.apply (SchemaRule.java:76)
...
Hi!
within this commit logging of
ClassAlreadyExistsException
was added toEnumRule.java
. This makes it inconsistent with other*Rule.java
clasess. For instanceObjectRule.java
does not do it (see here).I am not sure if such logging of
ClassAlreadyExistsException
is desired but suddenly getting following errors only for enums after upgrade is quite confusing:Thanks for taking a look at this!