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 2002/04/06 07:18:34 UTC

DO NOT REPLY [Bug 7784] New: - ConvertUtils changes long standing default conversions from null to zero

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7784>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7784

ConvertUtils changes long standing default conversions from null to zero

           Summary: ConvertUtils changes long standing default conversions
                    from null to zero
           Product: Commons
           Version: Nightly Builds
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: hal.deadman@tallan.com


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.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>