db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Price (JIRA)" <j...@apache.org>
Subject [jira] Created: (TORQUE-134) Recent change in Java 1.6.0_17 breaks Value.asDate()
Date Tue, 16 Feb 2010 12:57:27 GMT
Recent change in Java 1.6.0_17 breaks Value.asDate()
----------------------------------------------------

                 Key: TORQUE-134
                 URL: https://issues.apache.org/jira/browse/TORQUE-134
             Project: Torque
          Issue Type: Bug
          Components: Village
         Environment: Java 1.6.0_17 or higher
            Reporter: Dan Price


See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6898593 for more information.

Sun fixed a bug in Java 1.6.0_17 related to java.sql.Date.valueOf.  In all previous versions
of Java, it would accept incorrect values and malformed JDBC date escape format strings. 
Now, it does more checking and throws IllegalArgumentException if the passed date string is
not valid.

The java.sql.Date.valueOf function now checks that the form yyyy-MM-dd is strictly followed,
so if leading zeroes are suppressed on any of the elements, the valueOf function will throw
an exception.  Village builds the JDBC date escape format string without forcing leading zeroes,
so it can produce intermediate values of the form yyyy-M-d when either the month of the date
are less than 10.

The result of this was a Torque based program that unexpectedly started throwing exceptions
after upgrading from Java 1.6.0_10 to 1.6.0_18.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message