Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Nightly Builds
-
None
-
None
-
None
-
Operating System: other
Platform: All
-
7784
Description
The addition of pluggable converters in ConvertUtils on 3/18 has changed the
default conversion for Long, Integer, Double etc. from null to zero. The
default has been null since the before beanutils was in commons if I am not
mistaken.
This is a significant problem because it's not backwards compatible
with Struts 1.0. People probably came to rely on things like empty string
converting to null rather than zero.
Also, the current set of converters doesn't accept null as a legal default
value. If the default is set to null then an exception is thrown when the
conversion fails. There should at least be a way to make the various provided
converters accept null as default without having to code a new set of
converters.