commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14667] New: - PropertyUtils.copyProperties does not copy to DynaBean
Date Tue, 19 Nov 2002 04:02:18 GMT
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=14667>.
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=14667

PropertyUtils.copyProperties does not copy to DynaBean

           Summary: PropertyUtils.copyProperties does not copy to DynaBean
           Product: Commons
           Version: 1.5 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: topping@digidemic.com


I cannot seem to get PropertyUtils.copyProperties to copy to a DynaBean as the 
dest argument.

here's what I'm seeing under PropertyUtils 1.32:

in copyProperties:

orig is neither Map nor DynaBean, so line 283 calls
getPropertyDescriptors(orig).  Then, for each readMethod in the result, line
296 has:

   String name = origDescriptors[i].getName();
   if (getPropertyDescriptor(dest, name) != null) {

But getting into getPropertyDescriptor(), line 869 calls
getPropertyDescriptors(bean).  If the dest is a DynaBean, I'm not seeing
where the "instanceof DynaBean" is -- it simply calls
Introspector.getBeanInfo().getPropertyDescriptors(), but the result of
getBeanInfo doesn't know anything about DynaBeans.

What am I missing here?  Rana says this is working and appreciate his input,
especially with the release notes reference (thanks!)  But tracing through
the code and triple-checking at the beans (they both have a "name" property),
I still can't see how this is going to work, and in practice, the destination
DynaBean is untouched.

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message