tomj74 / chunk-templates

Chunk Templates, a template engine for Java
http://www.x5software.com/chunk/
MIT License
77 stars 10 forks source link

Android Bean Getter NullPointerException #32

Closed bravo-delta closed 3 years ago

bravo-delta commented 4 years ago

I'm experiencing a NullPointerException whenever the MadRobotIntrospector in ObjectDataMap tries to copy the properties into the Hashtable.

It happens if a Bean also contains Setters. In this case the property.getReadMethod() returns null for the Setters and the call to getter.invoke(bean, (Object[])null); crashes in the next line. ObjectDataMap.java#L571

This seems to be handled correctly for the non Android version ObjectDataMap.java#L521 Here a null check makes sure that only Getters are processed.

tomj74 commented 3 years ago

thanks, will be fixed in 3.6.0 release