You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anton Ivanov (JIRA)" <ji...@apache.org> on 2006/10/12 15:19:37 UTC

[jira] Commented: (HARMONY-933) java.util.regex.Pattern doesn't support canonical equivalence

    [ http://issues.apache.org/jira/browse/HARMONY-933?page=comments#action_12441726 ] 
            
Anton Ivanov commented on HARMONY-933:
--------------------------------------

As it is mentioned above some unit tests fail on the RI:

>Note that some added unit tests can cause exceptions while executing on reference 
>implementation but they are correct according to Unicode specification. 
>Also some tests may not pass while executing on reference implementation 
>but they have to pass according to Unicode specification.

For example while trying to pass PatternTest on the RI you can get the following
error:

java.util.regex.PatternSyntaxException: Unclosed group near index 59
(?:ǠI|ǠI|ǠI|ȦĪ|ȦĪ|ȦĪ|ǠI|ǠI|Aİ̄(?:Ìc|Ìc|Ic̀)db(ac)
^
at java.util.regex.Pattern.error(Pattern.java:1650)
at java.util.regex.Pattern.accept (Pattern.java:1508)
at java.util.regex.Pattern.group0(Pattern.java:2460)
at java.util.regex.Pattern.sequence(Pattern.java:1715)
at java.util.regex.Pattern.expr(Pattern.java:1687)
at java.util.regex.Pattern.compile (Pattern.java:1397)
at java.util.regex.Pattern.<init>(Pattern.java:1124)
at java.util.regex.Pattern.compile(Pattern.java:840)
at
org.apache.harmony.tests.java.util.regex.PatternTest.testCanonEqFlag(PatternTest.java :1060)
 
The RI fails to compile the following pattern with CANON_EQ flag specified:
       "\u01E0\u00CCcdb(ac)"
This is due to the RI tries to build alternations to take into account canonical equivalence. 
And the RI does so in simple cases. But if pattern is a little more complex the RI fails to compile it.
So the RI builds these alternations wrong.
You can see the following bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4867170

So, please mark this issue as non-bug-difference if needed.

Thanks,
Anton

> java.util.regex.Pattern doesn't support canonical equivalence
> -------------------------------------------------------------
>
>                 Key: HARMONY-933
>                 URL: http://issues.apache.org/jira/browse/HARMONY-933
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Anton Ivanov
>         Assigned To: Tim Ellison
>            Priority: Minor
>         Attachments: normalization_files.zip, patch_src.diff, patch_tests.diff
>
>
> Canonical equivalence support is not implemented in java.util.regex. Flag Pattern.CANON_EQ is ignored.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira