You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/10/14 14:39:33 UTC
DO NOT REPLY [Bug 37088] New: -
BeanUtils.copyProperties changes nulls (byte arrays) to empty byte arrays
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=37088>.
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=37088
Summary: BeanUtils.copyProperties changes nulls (byte arrays) to
empty byte arrays
Product: Commons
Version: 1.6 Final
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: minor
Priority: P5
Component: Bean Utilities
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: szczepiq@gmail.com
BeanUtils.copyProperties changes nulls (byte arrays) to empty byte arrays.
If an object has byte array field (and necessary accessors), that is null for
instance, the copy destination object will have empty byte array ( byte[0] ).
I noticed that ByteArrayConverter does not work well - if a convert(type, value)
method gets value == null, returns byte[0].
That's why copyProperties does not work properly - I expect null to be copied to
oher project, not an empty array.
I went through this problem by creating my own converter, but please consider if
API contract of method copyProperties() is fulfilled well.
Thank you,
Regards,
--
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