harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-997) String.replaceAll method does not work like RI if replacement string contains a backslash
Date Thu, 27 Jul 2006 13:33:13 GMT
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
            Priority: Minor


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