[ https://issues.apache.org/jira/browse/BEANUTILS-473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15398877#comment-15398877
]
Ramesh S commented on BEANUTILS-473:
------------------------------------
This is severely affecting our ability to upgrade to 1.9.2, which is required as part of upgrading
another 3rd party library. But we are stuck. Any solution/workaround available in the meantime?
Please help.
> Backward compatibility - copying null values to primitive types
> ---------------------------------------------------------------
>
> Key: BEANUTILS-473
> URL: https://issues.apache.org/jira/browse/BEANUTILS-473
> Project: Commons BeanUtils
> Issue Type: Bug
> Components: Bean / Property Utils
> Affects Versions: 1.9.2
> Reporter: Sven Raddatz
> Labels: IllegalArgumentException, backwards-compatibility, null-values
>
> Copying a NULL value to a primitve property in destination bean (e.g. boolean) was silently
ignored in BU 1.7.0. In 1.9.2 this is throwing an IllegalArgumentException.
> Since converters are not executed when value is null there is no way to prevent this
behaviour, making it hard to migrate from 1.7.0 to 1.9.2. The only way to accomplish this
task is to switch from primitive to non-primitive types in all destination beans, which would
result in huge testing effort.
> It would be nice to either have the possibility to use convertes to handle null values
with a valid default (e.g. null = false in case of boolean) or to globally have a switch for
a "silent / lenient mode" where any exceptions during copying are silently ignored.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)