Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
None
-
None
-
None
Description
The spec says for the method Charset.availableCharsets(): "In the absence of such changes (dynamically load of new charset providers), the charsets returned by this method are exactly those that can be retrieved via the forName method.
It works on RI but fails on Harmony.
================= test.java =======================
import java.util.SortedMap;
import java.nio.charset.Charset;
public class test {
public static void main(String args[]) {
SortedMap allCharsets = Charset.availableCharsets();
Object[] names = allCharsets.keySet().toArray();
for (int i = 0; i < names.length; ++i){
Charset _chset = (Charset) allCharsets.get(names[i]);
Charset chset = Charset.forName((String) names[i]);
if (!chset.name().equals(_chset.name()))
}
System.out.println("END");
}
}
===============================================
Output:
C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
END
C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test
java version 1.5 (subset)
(c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
forName(KSC_5601) returned 'Charset[EUC-KR]', instead of 'Charset[KSC_5601]'
END
Attachments
Attachments
Issue Links
- blocks
-
HARMONY-4110 [M2] umbrella task for 98% pass rate of Reliability test - HARMONY-2918; no regression since M1
- Closed