You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/05/05 09:36:30 UTC

[jira] Closed: (HARMONY-6144) [classlib][sql] 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

     [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou closed HARMONY-6144.
-------------------------------


Thanks, Regis.

> [classlib][sql] 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.0M9
>            Reporter: Kevin Zhou
>            Assignee: Regis Xu
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6144.diff, HARMONY-6144v2.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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.