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/04/10 10:03:12 UTC

[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

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


[jira] Updated: (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

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-6144:
--------------------------------

    Attachment: HARMONY-6144.diff

Would you please help to try it?

> [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
>
>         Attachments: HARMONY-6144.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.


[jira] Commented: (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

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705911#action_12705911 ] 

Kevin Zhou commented on HARMONY-6144:
-------------------------------------

I'm OK with it. Please go ahead.

> [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
>            Assignee: Regis Xu
>             Fix For: 5.0M9
>
>         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.


[jira] Assigned: (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

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Regis Xu reassigned HARMONY-6144:
---------------------------------

    Assignee: Regis Xu

> [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
>            Assignee: Regis Xu
>             Fix For: 5.0M9
>
>         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.


[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

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (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

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-6144:
--------------------------------

    Attachment: HARMONY-6144v2.diff

New patch adds more test cases.

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


[jira] Updated: (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

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Regis Xu updated HARMONY-6144:
------------------------------

    Affects Version/s:     (was: 5.0M8)
                       5.0M9
        Fix Version/s:     (was: 5.0M9)
                       5.0M10
              Summary: [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  (was: [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)

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


[jira] Commented: (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

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705908#action_12705908 ] 

Regis Xu commented on HARMONY-6144:
-----------------------------------

Hi Kevin,

>From the specs of java5 and java6, it seems no much difference, so I suppose it's bug of RI and I will apply it to java5 trunk, is it ok for you?

> [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
>            Assignee: Regis Xu
>             Fix For: 5.0M9
>
>         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.


[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

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
     [ 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.