harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (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
Date Tue, 05 May 2009 06:58:30 GMT

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

Regis Xu resolved HARMONY-6144.
-------------------------------

    Resolution: Fixed

Thanks Kevin.

Patch applied at r771574, please verify it was applied as you expected.

> [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.


Mime
View raw message