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 13896] - populate fails with mapped properties
Date Tue, 29 Oct 2002 19:58:23 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=13896>.
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=13896

populate fails with mapped properties

craig.mcclanahan@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX



------- Additional Comments From craig.mcclanahan@sun.com  2002-10-29 19:58 -------
The order in which properties from the Map are processed is the order of keys in
the Map, and is therefore dependent on the Map's implementation of the keys()
method.  It is therefore not appropriate for BeanUtils to make any attempt at
guaranteeing a processing order.  Further, attempting to do as you ask would
likely require two passes through the Map, which would reduce performance for
ALL users even if their apps did not depend on order.

The BeanUtils.populate() and BeanUtils.copyProperties() methods are specifically
designed to populate a *single* destination bean, not an entire tree.  I would
suggest that you factor your processing to set up the properties for each
Article into a separate Map, that populates them in a loop, and adds them to the
Test instance that should contain them.  If you're doing all of this based on
XML input, you might also explore using the Digester package to process your
input document and instantiate the appropriate bean instances for you.

--
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