-
Bug
-
Resolution: Fixed
-
Neutral
-
None
Java 8 has a slightly different JavaBeans implementation, leading to the propertyType of a java.beans.PropertyDescriptor being null when a getter/setter don't take/return the exact same type AND that property is declared on a parent class of the one we're introspecting. Don't ask me why.
When introspecting classes with org.apache.commons.beanutils.PropertyUtils#getPropertyDescriptors, which in turn uses java.beans.Introspector and returns arrays of java.beans.PropertyDescriptor, if getter and setter use different type (e.g setter takes a narrower type), and we're introspecting a subclass of the class where the property in question is declared:
- With Java 6: only the propertyType and readMethod are seen; node2bean won't be able to set the property without a writeMethod.
- if there is an add method, then that's used instead of the writeMethod and all is well.
- With Java 8: only the readMethod and writeMethod are seen, but propertyType isn't.
- if there is an add method, then that's used instead of the writeMethod and all is well.
Acceptance criteria
- relates to
-
MAGNOLIA-5535 Enable to run with Java 8
- Closed