commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timm Frenzel (JIRA)" <>
Subject [jira] [Commented] (BEANUTILS-454) copyProperties() throws conversion exception for null Date
Date Tue, 26 Nov 2013 09:22:35 GMT


Timm Frenzel commented on BEANUTILS-454:

I agree to Markus, that the behaviour of this method should not be changed suddenly. If the
previous behaviour was not ok, the new behaviour should either be applied in a new method
or explicitly activated somehow , since only new code probably expects this new behaviour.
Also I can't see why there should be a different behaviour for different types. Either it
should always silently copy *null* values or always throw an exception. In the latter case
it should be built in in a way that don't hurts existing code.

> copyProperties() throws conversion exception for null Date
> ----------------------------------------------------------
>                 Key: BEANUTILS-454
>                 URL:
>             Project: Commons BeanUtils
>          Issue Type: Bug
>    Affects Versions: 1.8.0
>            Reporter: Markus Stahl
>            Priority: Critical
>             Fix For: 1.8.4
> This issue had been reported earlier and rejected too soon. 
> Since 1.8.0, BeanUtils.copyProperties suddenly throws an Exception, if the property is
of type Date. It did not do so in prior releases, that's why properly running software is
nowadays broken. There is a workaround if the BeanUtils are used in my own code, but if it
is used in 3rd party code, I am screwed.
> Please, treat null for Date the same as null for any other type and copy null from source
to destination.
> For more reasons, see the comments of people who move now to new releases of BeanUtils
facing the same problem. The issue gets more and more attention, but I think, nobody except
the reporters are notified about it. Therefore this issue.

This message was sent by Atlassian JIRA

View raw message