harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-997) String.replaceAll method does not work like RI if replacement string contains a backslash
Date Mon, 14 Aug 2006 06:41:15 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-997?page=all ]

Anton Ivanov updated HARMONY-997:
---------------------------------

    Attachment: patch_src.diff
                patch_tests.diff

Patch for the problem.

> 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

        

Mime
View raw message