Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10162

Consider bridge methods in SpEL properties

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2 GA
    • Fix Version/s: 3.1.4, 3.2.1
    • Component/s: Core:SpEL
    • Labels:
    • Last commented by a User:
      false

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwebb Phil Webb
                Reporter:
                mgallo Marian Gallo
                Last updater:
                Phil Webb
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 47 weeks, 2 days ago