DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17036>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17036

PropertyUtils doesn't recognise "normal" properties on a DynaBean decendent object.

           Summary: PropertyUtils doesn't recognise "normal" properties on a
                    DynaBean decendent object.
           Product: Commons
           Version: 1.6 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Bean Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using the PropertyUtils "normal" (non DynaProperty) properties are not 
recognised on an object decended from a DynaBean.
On an object not decended from a DynaBean the PropertyUtils method 
getPropertyType, getProperty, setProperty etc recognise methods of the form 
getXYZ, setXYZ etc. On an object that is decended from a DynaBean the 
PropertyUtils only check for a DyanProperty of the specified name before 
raising an exception.
Code below:

        // Handle DynaBean instances specially
        if (bean instanceof DynaBean) {
            DynaProperty descriptor =
                    ((DynaBean) bean).getDynaClass().getDynaProperty(name);
            if (descriptor == null) {
                throw new NoSuchMethodException("Unknown property '" +
                        name + "'");
            }
            return (((DynaBean) bean).get(name, index));
        }

Can this be changed so that it falls through and checks all other options 
before raising an exception?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to