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 2003/12/15 17:39:26 UTC

DO NOT REPLY [Bug 25539] New: - Using copyProperties and SQL Dates

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=25539>.
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=25539

Using copyProperties and SQL Dates

           Summary: Using copyProperties and SQL Dates
           Product: Commons
           Version: 1.6 Final
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: waderobbins@comcast.net


An Error will occur if you try to copy a bean to another bean when they 
contain java.sql.Date objects.  The issue lays in the SqlDateConverter and 
useDefault attribute is set to false if you use the default constructor.

Fix:
ConvertUtils
Add a null constructor parameter to SqlDateConverter, SqlTimeConverter and 
SqlTimestampConverter

Code: 
public static void deregister() {
.....
   converters.put(Date.class, new SqlDateConverter(null));
   converters.put(Time.class, new SqlTimeConverter(null));
   converters.put(Timestamp.class, new SqlTimestampConverter(null));

}

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org