commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7784] New: - ConvertUtils changes long standing default conversions from null to zero
Date Sat, 06 Apr 2002 05:18:34 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message