You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Richard Liang (JIRA)" <ji...@apache.org> on 2006/06/30 05:01:29 UTC
[jira] Created: (HARMONY-713) java.util.regex.Matcher.find()
ignores the specified region when the pattern is "c"
java.util.regex.Matcher.find() ignores the specified region when the pattern is "c"
-----------------------------------------------------------------------------------
Key: HARMONY-713
URL: http://issues.apache.org/jira/browse/HARMONY-713
Project: Harmony
Type: Bug
Components: Classlib
Reporter: Richard Liang
Hello Nik,
java.util.regex.Matcher.find() ignores the specified region when the pattern is "c".
The following test pass on RI, but fail on Harmony. I will attach the test for regression soon :-)
public void testFindRegionChanged2() {
Pattern pattern = Pattern.compile("c");
String inputStr = "aabb.c";
Matcher matcher = pattern.matcher(inputStr);
matcher.region(0, 3);
assertFalse(matcher.find());
}
Best regards,
Richard.
--
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-713) java.util.regex.Matcher.find()
ignores the specified region when the pattern is "c"
Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-713?page=comments#action_12440872 ]
Nikolay Kuznetsov commented on HARMONY-713:
-------------------------------------------
Thanks George, Richard.
Sorry for the late response, hopefully better late than never. I confirm that everything was applied as expected.
Thank you.
Nik.
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c"
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-713
> URL: http://issues.apache.org/jira/browse/HARMONY-713
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Richard Liang
> Assigned To: George Harley
> Attachments: regex.src.diff, region.patch
>
>
> Hello Nik,
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c".
> The following test pass on RI, but fail on Harmony. I will attach the test for regression soon :-)
> public void testFindRegionChanged2() {
> Pattern pattern = Pattern.compile("c");
> String inputStr = "aabb.c";
> Matcher matcher = pattern.matcher(inputStr);
> matcher.region(0, 3);
>
> assertFalse(matcher.find());
> }
> Best regards,
> Richard.
--
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-713) java.util.regex.Matcher.find()
ignores the specified region when the pattern is "c"
Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-713?page=comments#action_12427399 ]
Richard Liang commented on HARMONY-713:
---------------------------------------
Hello George,
Thanks a lot. The fix looks good.
Best regards,
Richard
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c"
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-713
> URL: http://issues.apache.org/jira/browse/HARMONY-713
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Richard Liang
> Assigned To: George Harley
> Attachments: regex.src.diff, region.patch
>
>
> Hello Nik,
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c".
> The following test pass on RI, but fail on Harmony. I will attach the test for regression soon :-)
> public void testFindRegionChanged2() {
> Pattern pattern = Pattern.compile("c");
> String inputStr = "aabb.c";
> Matcher matcher = pattern.matcher(inputStr);
> matcher.region(0, 3);
>
> assertFalse(matcher.find());
> }
> Best regards,
> Richard.
--
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-713) java.util.regex.Matcher.find()
ignores the specified region when the pattern is "c"
Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-713?page=all ]
Nikolay Kuznetsov updated HARMONY-713:
--------------------------------------
Attachment: region.patch
The pattern compiled in the example is represented as a SequenceSet in HARMONY regex package. Such a nodes has they own algorithm of find method (Simplified Boyer-Moore algorithm). This implementation did not take into acount right region bound. Attached patch contains fix of this problem.
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c"
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-713
> URL: http://issues.apache.org/jira/browse/HARMONY-713
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Richard Liang
> Assigned To: George Harley
> Attachments: regex.src.diff, region.patch
>
>
> Hello Nik,
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c".
> The following test pass on RI, but fail on Harmony. I will attach the test for regression soon :-)
> public void testFindRegionChanged2() {
> Pattern pattern = Pattern.compile("c");
> String inputStr = "aabb.c";
> Matcher matcher = pattern.matcher(inputStr);
> matcher.region(0, 3);
>
> assertFalse(matcher.find());
> }
> Best regards,
> Richard.
--
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-713) java.util.regex.Matcher.find()
ignores the specified region when the pattern is "c"
Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-713?page=all ]
Richard Liang updated HARMONY-713:
----------------------------------
Attachment: regex.src.diff
Hello,
Here is the patch of regression test. Thanks a lot.
Best regards,
Richard.
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c"
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-713
> URL: http://issues.apache.org/jira/browse/HARMONY-713
> Project: Harmony
> Type: Bug
> Components: Classlib
> Reporter: Richard Liang
> Attachments: regex.src.diff
>
> Hello Nik,
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c".
> The following test pass on RI, but fail on Harmony. I will attach the test for regression soon :-)
> public void testFindRegionChanged2() {
> Pattern pattern = Pattern.compile("c");
> String inputStr = "aabb.c";
> Matcher matcher = pattern.matcher(inputStr);
> matcher.region(0, 3);
>
> assertFalse(matcher.find());
> }
> Best regards,
> Richard.
--
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-713) java.util.regex.Matcher.find()
ignores the specified region when the pattern is "c"
Posted by "George Harley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-713?page=all ]
George Harley reassigned HARMONY-713:
-------------------------------------
Assign To: George Harley
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c"
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-713
> URL: http://issues.apache.org/jira/browse/HARMONY-713
> Project: Harmony
> Type: Bug
> Components: Classlib
> Reporter: Richard Liang
> Assignee: George Harley
> Attachments: regex.src.diff
>
> Hello Nik,
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c".
> The following test pass on RI, but fail on Harmony. I will attach the test for regression soon :-)
> public void testFindRegionChanged2() {
> Pattern pattern = Pattern.compile("c");
> String inputStr = "aabb.c";
> Matcher matcher = pattern.matcher(inputStr);
> matcher.region(0, 3);
>
> assertFalse(matcher.find());
> }
> Best regards,
> Richard.
--
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-713) java.util.regex.Matcher.find()
ignores the specified region when the pattern is "c"
Posted by "George Harley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-713?page=all ]
George Harley resolved HARMONY-713.
-----------------------------------
Resolution: Fixed
Richard and Nikolay,
Patches committed in revision 429379. Please could you verify that they have been applied as expected.
Best regards,
George
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c"
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-713
> URL: http://issues.apache.org/jira/browse/HARMONY-713
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Richard Liang
> Assigned To: George Harley
> Attachments: regex.src.diff, region.patch
>
>
> Hello Nik,
> java.util.regex.Matcher.find() ignores the specified region when the pattern is "c".
> The following test pass on RI, but fail on Harmony. I will attach the test for regression soon :-)
> public void testFindRegionChanged2() {
> Pattern pattern = Pattern.compile("c");
> String inputStr = "aabb.c";
> Matcher matcher = pattern.matcher(inputStr);
> matcher.region(0, 3);
>
> assertFalse(matcher.find());
> }
> Best regards,
> Richard.
--
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