You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nathan Beyer (JIRA)" <ji...@apache.org> on 2006/08/26 20:16:23 UTC
[jira] Resolved: (HARMONY-997) String.replaceAll method does not
work like RI if replacement string contains a backslash
[ http://issues.apache.org/jira/browse/HARMONY-997?page=all ]
Nathan Beyer resolved HARMONY-997.
----------------------------------
Resolution: Fixed
Patch applied. Please verify. Thanks.
> String.replaceAll method does not work like RI if replacement string contains a backslash
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-997
> URL: http://issues.apache.org/jira/browse/HARMONY-997
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Mikhail Fursov
> Assigned To: Nathan Beyer
> Priority: Minor
> Attachments: patch_src.diff, patch_tests.diff
>
>
> This test:
> "replace me".replaceAll("me", "\\");
> produces different results when runned on Harmony or RI
> RI fails with a message:
> Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1
> at java.lang.String.charAt(String.java:558)
> at java.util.regex.Matcher.appendReplacement(Matcher.java:696)
> at java.util.regex.Matcher.replaceAll(Matcher.java:806)
> at java.lang.String.replaceAll(String.java:2000)
> at Test.main(Test.java:13)
> while Harmony allows such replacement.
> I think this is Harmony bug.
--
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