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

LocaleBeanUtils setProperty does not work on nested property

    XMLWordPrintableJSON

Details

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

    • 30203

    Description

      LocaleBeanUtils setProperty does not work on nested property.
      I think the problem is in the method definePropertyType(Object target, String
      name, String propName).
      When property is a nested property ("prop1.propnested") target is the result
      of a call of the "prop1" getter on the oroginal bean, name is the property
      name complete ("prop1.propnested") and propName is the property name in target
      object ("propnested").
      At line 601 the property descriptor is defined as
      descriptor = PropertyUtils.getPropertyDescriptor(target, name);
      and in case of nested propery it is never found (null)
      I think the correct line 601 is
      descriptor = PropertyUtils.getPropertyDescriptor(target, propName);

      Attachments

        Activity

          People

            niallp Niall Pemberton
            marco.laporta@tiscalinet.it Marco La Porta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: