harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6144) [classlib][sql][java6] java.sql.Timestamp.valueOf(String s) should throw java.lang.IllegalArgumentException if the given string isn't in yyyy-mm-dd hh:mm:ss.fffffffff format
Date Fri, 10 Apr 2009 08:03:12 GMT
[classlib][sql][java6] java.sql.Timestamp.valueOf(String s) should throw java.lang.IllegalArgumentException
if the given string isn't in yyyy-mm-dd hh:mm:ss.fffffffff format
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6144
                 URL: https://issues.apache.org/jira/browse/HARMONY-6144
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M8
            Reporter: Kevin Zhou
             Fix For: 5.0M9


Given a test case [1], RI6 passes while both of HY and RI5 fails.
The java spec specifies that java.sql.Timestamp.valueOf(String s) should throw IllegalArgumentException
if the given string does not have the format yyyy-mm-dd hh:mm:ss.fffffffff.
I think we should follow RI6's behavior according to the requirement of java spec here.

[1] Test Case:
public void test_valueOf_IllegalArgumentException() {
    try {
        java.sql.Timestamp.valueOf("178548938-12-22 15:00:01.000000001");
        fail("should throw IllegalArgumentException");
    } catch (IllegalArgumentException e) {
        // Expected
    }
}

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


Mime
View raw message