Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-162

PropertyUtils.getNestedProperty() doesn't allow getXxxx on Map-Instances any longer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.8.0
    • None
    • None
    • Operating System: All
      Platform: PC

    • 23815

    Description

      Hi there!

      For a long time we use Struts 1.0 and <bean:write ...> on objects derivated
      from Map.

      Back then <bean:write name="obj1" property="obj2.obj3"> did a obj1.getObj2
      ().getObj3(), even when obj2 was an object derivated from Map.

      Since Struts 1.1 the bean:write above does not any longer access "getObj3()".
      Instead it does (in PropertyUtils.getNestedProperty() ) "if (bean instanceof
      Map)

      { bean = ((Map) bean).get(name); }

      " - in my example: obj1.getObj2().get
      ("obj3").

      This causes a massive incompatibility with JSP pages generated under Struts
      1.0. We have several projects with this problem if we would upgrade them to
      Struts 1.1 (which would take some time cause it means redesign of all classes
      that are derivated from Map and accessed via <bean:write> and other tags).

      I hope there can be an alternative solution provided by Struts!

      Thanks for the time,
      Thomas Sahling

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tsahling@hausmannwynen.de Thomas Sahling
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: