You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexander Simbirtsev (JIRA)" <ji...@apache.org> on 2006/06/27 11:42:29 UTC
[jira] Created: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
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
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
[jira] Commented: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-674?page=comments#action_12419257 ]
Nikolay Kuznetsov commented on HARMONY-674:
-------------------------------------------
The patch was applied as expected, thanks a lot for creating test case.
Thank you.
Nik.
> 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
> Assignee: Tim Ellison
> 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
[jira] Commented: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
Posted by "Alexander Simbirtsev (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-674?page=comments#action_12419277 ]
Alexander Simbirtsev commented on HARMONY-674:
----------------------------------------------
Yes, It does fix the issue.
Thank you!
> 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
> Assignee: Tim Ellison
> 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
[jira] Closed: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-674?page=all ]
Tim Ellison closed HARMONY-674:
-------------------------------
Verified by Alexander.
> 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
> Assignee: Tim Ellison
> 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
[jira] Resolved: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-674?page=all ]
Tim Ellison resolved HARMONY-674:
---------------------------------
Resolution: Fixed
Thanks Alexander and Nikolay.
Patch applied to REGEX module at repo revision r418840, and regression test at r418843.
Please check that the patch was applied as expected, and that this fully resolves the problem.
> 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
> Assignee: Tim Ellison
> 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
[jira] Assigned: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-674?page=all ]
Tim Ellison reassigned HARMONY-674:
-----------------------------------
Assign To: Tim Ellison
> 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
> Assignee: Tim Ellison
> 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
[jira] Commented: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-674?page=comments#action_12419267 ]
Tim Ellison commented on HARMONY-674:
-------------------------------------
Does this fix the issue for you Alexander ?
> 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
> Assignee: Tim Ellison
> 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
[jira] Updated: (HARMONY-674) Pattern throws
ArrayIndexOutOfBoundsException when mathching regexp
Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
[ 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