You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Regis Xu (JIRA)" <ji...@apache.org> on 2009/05/05 07:59:30 UTC
[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
[ 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.