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

Improve exception message for failed property access in SpEL

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.2.8, 4.0.2
    • Fix Version/s: 3.2.9, 4.0.3
    • Component/s: Core:SpEL
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      In case property access for a bean property fails, SpEL's PropertyOrFieldReference currently throws an exception with the following message:

      EL1008E:(pos 7): Field or property '…' cannot be found on object of type '…'
      

      As PropertyOrFieldReference is only looking for public fields, it would be nice if that was reflected in the error message as one might be puzzled if the field actually exists but is not a public one.

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            olivergierke Oliver Drotbohm
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 30 weeks, 1 day ago