harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-674) Pattern throws ArrayIndexOutOfBoundsException when mathching regexp
Date Mon, 03 Jul 2006 16:31:30 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-674?page=all ]

Nikolay Kuznetsov updated HARMONY-674:
--------------------------------------

    Attachment: nonCap.patch

Non-capturing group in Harmoni implmentation have to count number of character consumed, to
avoid overflow on quantifiers, this functionality was duplicated with indices counting for
particular group, while no actual group exists.

Fix attached.

> Pattern throws ArrayIndexOutOfBoundsException when mathching regexp
> -------------------------------------------------------------------
>
>          Key: HARMONY-674
>          URL: http://issues.apache.org/jira/browse/HARMONY-674
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>  Environment: any
>     Reporter: Alexander Simbirtsev
>  Attachments: nonCap.patch
>
> Use the following code to reproduce:
> import java.util.regex.Pattern;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     public void testPatternMatcher() throws Exception {
>         Pattern pattern = Pattern.compile("(?:\\d+)(?:pt)");
>         assertTrue(pattern.matcher("14pt").matches());
>     }
> }

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


Mime
View raw message