Can't reopen issue #17, so have to create a new one.
org.orman.mapper.ReverseMapping is broken as its method map() causes ClassCastException when trying to cast String to Integer: fieldValue = enumConstant[(Integer) fieldValue];.
fieldValue = enumConstant[(Integer) fieldValue];
The whole enum processing should be moved to smartCasting() method and use new Integer(value.toString()) for enums.
avoid npexc. and classcastexception in reverse mapping of enums (fix #44
), fix #41.
I have no idea how fieldValue arrived there as String but your solution is better for converting to Integer. I also handled enum field being null that previously logged an error due to NullPointerException redundantly. Updated the jar in Downloads. Thanks!
Neither can I figure out why I decided it was String to Integer conversion problem. Anyway, new JAR works like a charm. Thanks.