Description
Marian Gallo opened SPR-10162 and commented
I have found a problem with evaluating of object property values used within SpEL expressions in version 3.2. Expressions were working in older versions (have tried 3.0.6, 3.1.3).
I made an analysis and have found a reason. There was done a change in a class org.springframework.expression.spel.support.ReflectivePropertyAccessor in version 3.2. There was added a subcondition !method.isBridge() in method findGetterForProperty(String propertyName, Class<?> clazz, boolean mustBeStatic) which hides desired class getter for a property which shall be used in an expression during evaluation.
I checked that the problematic getter is a bridge method. A class which I would like to access via a property has a deep inheritance tree - but there is no class design irregularity.
Is there a reason why this behaviour was changed?
It is a blocking issue for us to migrate to Spring 3.2.
Affects: 3.2 GA
Issue Links:
- ReflectivePropertyAccessor should not consider bridge methods [SPR-9994] #14628 ReflectivePropertyAccessor should not consider bridge methods
- Backport "ReflectivePropertyAccessor should not consider bridge methods" [SPR-9995] #14629 Backport "ReflectivePropertyAccessor should not consider bridge methods"
Referenced from: commits 5ae706e, fce7adc
Backported to: 3.1.4