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 10753] - BeanUtils.populate() does bad conversion on DynaBean
Date Mon, 22 Jul 2002 18:41:47 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=10753>.
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=10753

BeanUtils.populate() does bad conversion on DynaBean

lalyos@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |



------- Additional Comments From lalyos@yahoo.com  2002-07-22 18:41 -------
If you run the testPopulateMapped() JUnit test with debug level:
ant test.dyna.bean -Dtest.level=debug

You will find the following 2 lines somewhere in the middle of the output:
     [java] [DEBUG] ConvertUtils - -Convert string 'New First Value' to 
class 'java.util.Map'
     [java] [DEBUG] ConvertUtils - -Convert string 'New Third Value' to 
class 'java.util.Map'

The testPopulateMapped() method tries to polulate the "New First Value" into 
the "mappedProperty(First Key)" property of a DynaBean. But this property is a 
Map, so you can put _anything_ (Object) into a Map. It means that no type 
conversion is needed. Contrarily the BeanUtils tries to convert "New First 
Value" into a Map. I think it's a bug, or maybe I misunderstood something.

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