harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohanraj Loganathan (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6582) [classlib][luni]String.indexOf behaves wrongly if the string contains any Supplementary Characters
Date Thu, 15 Jul 2010 05:06:49 GMT
[classlib][luni]String.indexOf behaves wrongly if the string contains any Supplementary Characters
--------------------------------------------------------------------------------------------------

                 Key: HARMONY-6582
                 URL: https://issues.apache.org/jira/browse/HARMONY-6582
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows and Linux
            Reporter: Mohanraj Loganathan
         Attachments: StringIndexOf_001.diff

If the String contains Supplementary characters in it then String.indexof function returns
wrong values in Harmony. 

If the String chars codepoint value above 0x10FFFF , then String.indexOf return wrong results.

Consider the example below:
if("a\ud800\udc00".indexOf(0x10000) != 1)
	System.out.println("we should not be here");
if("ab\ud800\udc00".indexOf(0x10000, 1) != 2)
	System.out.println("we should not be here");

Above test passes in RI and fails with harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message