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/16 02:32:02 UTC
DO NOT REPLY [Bug 37088] -
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
niallp@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
------- Additional Comments From niallp@apache.org 2005-10-16 02:32 -------
All the *default* primitive array converters have an empty array as the default
value (see the ConvertUtils.deregister() method) and therefore will exhibit the
behaviour you are seeing.
To resolve this there is no need to create your own custom converter - you can
simply instantiate a ByteArrayConverter with a "null" default value and
register it with ConvertUtils:
Class byteArrayClass = (new byte[0]).getClass();
ConvertUtils.register(byteArrayClass, new ByteArrayConverter(null));
Changing the current default behaviour would break backwards compatability
which others are probably relying on.
Since this is working as expected and there is a simple mechanism provided to
change the default behaviour, I'm closing this as WONTFIX.
--
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