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 32851] New: - copyProperties and null/empty values.
Date Mon, 27 Dec 2004 18:24:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32851>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32851

           Summary: copyProperties and null/empty values.
           Product: Commons
           Version: 1.6 Final
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: mauricio_noda@hotmail.com


When BeanUtils.copyProperties copies a String property to a BigDecimal property
it throws ConversionException when the String property is null or "".
The opposite, when it copies a null BigDecimal property to a String property,
works fine, the String is set to null.

When BeanUtils.copyProperties copy a null or "" String property to a Integer
property, it sets the Integer to 0. The opposite, when I copy a null Integer
property to a String property it is set to null. Copying a null String to a null
Integer instead of 0 would be more consistent. (happens with other numeric
wrapper classes too).

These 2 issues are problematic when there are optional fields inside a Struts
ActionForm and the empty values are copied to a TO.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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