harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6515) [classlib][regex] incorrect/confusing Pattern matching behaviour
Date Fri, 03 Sep 2010 11:03:35 GMT

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

Tim Ellison updated HARMONY-6515:
---------------------------------

    Fix Version/s:     (was: 5.0M15)

> [classlib][regex] incorrect/confusing Pattern matching behaviour
> ----------------------------------------------------------------
>
>                 Key: HARMONY-6515
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6515
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M13
>            Reporter: Mark Hindess
>
> All of the following should print true:
>         P = Pattern.compile("^(?:a{1}:){5}a$");
>         System.out.println("P = "+P);
>         System.out.println("Simple char with 5 separators: "+P.matcher("a:a:a:a:a:a").matches());
>         P = Pattern.compile("^(?:[a]:){5}a$");
>         System.out.println(" Char class with 5 separators: "+P.matcher("a:a:a:a:a:a").matches());
>         P = Pattern.compile("^(?:[a]{1}:){5}a$");
>         System.out.println(" Char class w/{1} and 5 sep/s: "+P.matcher("a:a:a:a:a:a").matches());
>         P = Pattern.compile("^(?:[a]{1}:){4}a$");
>         System.out.println(" Char class w/{1} and 4 sep/s: "+P.matcher("a:a:a:a:a").matches());
>         P = Pattern.compile("^(?:[a]{1,4}:){4}a$");
>         System.out.println(" Char class w/{1,4} + 4 sep/s: "+P.matcher("a:a:a:a:a").matches());
>         P = Pattern.compile("^(?:[a]{1,4}:){5}a$");
>         System.out.println(" Char class w/{1,4} + 5 sep/s: "+P.matcher("a:a:a:a:a:a").matches());
> but on harmony they print:
>   Simple char with 5 separators: true
>    Char class with 5 separators: true
>    Char class w/{1} and 5 sep/s: false
>    Char class w/{1} and 4 sep/s: false
>    Char class w/{1,4} + 4 sep/s: true
>    Char class w/{1,4} + 5 sep/s: false
> (Yes.  That's right just changing the {4} to {5} and adding an extra 'a:' to the string
causes the last one
> to break.)
> I found this while running the Apache HttpComponents HttpClient 4.1-alpha2 tests on the
(potential) milestone releases.

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