You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Li Jing Qin (JIRA)" <ji...@apache.org> on 2009/06/15 09:48:07 UTC

[jira] Created: (HARMONY-6231) [classlib][text] DateFormat does not consider lenient

[classlib][text] DateFormat does not consider lenient
-----------------------------------------------------

                 Key: HARMONY-6231
                 URL: https://issues.apache.org/jira/browse/HARMONY-6231
             Project: Harmony
          Issue Type: Bug
            Reporter: Li Jing Qin
            Priority: Minor


When user set lenient with strict parsing, harmony do not follow this. The simple test case is follow:
Date d = null;
DateFormat output = new SimpleDateFormat("MM/dd/yy");
output.setLenient(false);
try {
    d = output.parse("01/01/-1");
    fail("Should throw ParseException here.");
} catch (ParseException e) {}

The reason is we are delegate the format to the icu, but forget set icu's lenient.
So the solution is straight and simple.

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


[jira] Resolved: (HARMONY-6231) [classlib][text] DateFormat does not consider lenient

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

Regis Xu resolved HARMONY-6231.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M11

Thanks Li Jing Qin.

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


> [classlib][text] DateFormat does not consider lenient
> -----------------------------------------------------
>
>                 Key: HARMONY-6231
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6231
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Li Jing Qin
>            Assignee: Regis Xu
>            Priority: Minor
>             Fix For: 5.0M11
>
>         Attachments: HARMONY-6231.diff
>
>
> When user set lenient with strict parsing, harmony do not follow this. The simple test case is follow:
> Date d = null;
> DateFormat output = new SimpleDateFormat("MM/dd/yy");
> output.setLenient(false);
> try {
>     d = output.parse("01/01/-1");
>     fail("Should throw ParseException here.");
> } catch (ParseException e) {}
> The reason is we are delegate the format to the icu, but forget set icu's lenient.
> So the solution is straight and simple.

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


[jira] Assigned: (HARMONY-6231) [classlib][text] DateFormat does not consider lenient

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

Regis Xu reassigned HARMONY-6231:
---------------------------------

    Assignee: Regis Xu

> [classlib][text] DateFormat does not consider lenient
> -----------------------------------------------------
>
>                 Key: HARMONY-6231
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6231
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Li Jing Qin
>            Assignee: Regis Xu
>            Priority: Minor
>             Fix For: 5.0M11
>
>         Attachments: HARMONY-6231.diff
>
>
> When user set lenient with strict parsing, harmony do not follow this. The simple test case is follow:
> Date d = null;
> DateFormat output = new SimpleDateFormat("MM/dd/yy");
> output.setLenient(false);
> try {
>     d = output.parse("01/01/-1");
>     fail("Should throw ParseException here.");
> } catch (ParseException e) {}
> The reason is we are delegate the format to the icu, but forget set icu's lenient.
> So the solution is straight and simple.

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


[jira] Closed: (HARMONY-6231) [classlib][text] DateFormat does not consider lenient

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

Regis Xu closed HARMONY-6231.
-----------------------------


> [classlib][text] DateFormat does not consider lenient
> -----------------------------------------------------
>
>                 Key: HARMONY-6231
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6231
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Li Jing Qin
>            Assignee: Regis Xu
>            Priority: Minor
>             Fix For: 5.0M11
>
>         Attachments: HARMONY-6231.diff
>
>
> When user set lenient with strict parsing, harmony do not follow this. The simple test case is follow:
> Date d = null;
> DateFormat output = new SimpleDateFormat("MM/dd/yy");
> output.setLenient(false);
> try {
>     d = output.parse("01/01/-1");
>     fail("Should throw ParseException here.");
> } catch (ParseException e) {}
> The reason is we are delegate the format to the icu, but forget set icu's lenient.
> So the solution is straight and simple.

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


[jira] Updated: (HARMONY-6231) [classlib][text] DateFormat does not consider lenient

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

Li Jing Qin updated HARMONY-6231:
---------------------------------

    Attachment: HARMONY-6231.diff

Test case and fix are added

> [classlib][text] DateFormat does not consider lenient
> -----------------------------------------------------
>
>                 Key: HARMONY-6231
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6231
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Li Jing Qin
>            Priority: Minor
>         Attachments: HARMONY-6231.diff
>
>
> When user set lenient with strict parsing, harmony do not follow this. The simple test case is follow:
> Date d = null;
> DateFormat output = new SimpleDateFormat("MM/dd/yy");
> output.setLenient(false);
> try {
>     d = output.parse("01/01/-1");
>     fail("Should throw ParseException here.");
> } catch (ParseException e) {}
> The reason is we are delegate the format to the icu, but forget set icu's lenient.
> So the solution is straight and simple.

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


[jira] Commented: (HARMONY-6231) [classlib][text] DateFormat does not consider lenient

Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719941#action_12719941 ] 

Li Jing Qin commented on HARMONY-6231:
--------------------------------------

Verified. Thanks Regis.

> [classlib][text] DateFormat does not consider lenient
> -----------------------------------------------------
>
>                 Key: HARMONY-6231
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6231
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Li Jing Qin
>            Assignee: Regis Xu
>            Priority: Minor
>             Fix For: 5.0M11
>
>         Attachments: HARMONY-6231.diff
>
>
> When user set lenient with strict parsing, harmony do not follow this. The simple test case is follow:
> Date d = null;
> DateFormat output = new SimpleDateFormat("MM/dd/yy");
> output.setLenient(false);
> try {
>     d = output.parse("01/01/-1");
>     fail("Should throw ParseException here.");
> } catch (ParseException e) {}
> The reason is we are delegate the format to the icu, but forget set icu's lenient.
> So the solution is straight and simple.

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