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 23690] New: - [beanutils] Wrapped DynaBean Enhancement
Date Thu, 09 Oct 2003 02:35:12 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=23690>.
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=23690

[beanutils] Wrapped DynaBean Enhancement

           Summary: [beanutils] Wrapped DynaBean Enhancement
           Product: Commons
           Version: 1.6 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: niall.pemberton@blueyonder.co.uk


Thanks for the "Wrapped" DynaBeans - they're excellent.

I have requests for a few modifications and will attach a patch file.

1) WrapDynaClass - I changed to implement the newInstance() method. It 
instantiates the JavaBean from its class and wraps it in a new WrapDynaBean. I 
have processing which is passed the DynaClass and generates beans - 
implementing this now means I can process regular beans as well as DynaBeans 
without changing anything inside my existing processing.


2) WrapDynaBean - I have some processing which generates DynaBeans (and now 
also "wrapped" JavaBeans), but I need to be able to get the JavaBean instance 
out of the wrapper afterwards. I added a getInstance() method to do this.

3) WrapDynaBean - The get(name) and set(name, value) methods are trapping 
Exceptions and issuing a standard IllegalArgumentException. This message can be 
mis-leading (I got a "no setter" message when the problem was I was passing a 
String value to an "integer" setter). When I looked at this further it seems 
inefficient to use the PropertyUtils.get/setSimpleProperty when the 
WrapDynaClass already has the PropertyDescriptor stored - so rather than 
determining the PropertyDescriptor every time a get/set is called its only done 
once for a JavaBean class.

Niall

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


Mime
View raw message