Name: dfC67450 Date: 09/24/98
Locale.ENGLISH no longer present in Collator.getAvailableLocales().
getAvailableLocales() of NumberFormat, DateFormat and Calendar
does not containt it also.
This bug was introduced in JDK1.2-fcsK.
Here is the test demonstrating the bug:
-----------------Test.java------------------------
import java.util.*;
import java.text.*;
public class Test {
public static void main (String args[]){
Locale[] locales = Collator.getAvailableLocales();
boolean passed = false;
for (int i = 0; i < locales.length && !passed; i++) {
if (locales[i].equals(Locale.US)) {
passed = true;
}
}
if (passed) {
System.out.println("Test passed");
} else {
System.out.println("Test failed");
}
}
}
---------Output from the test (jdk1.2-fcs-K) ---------------------
Test failed
---------Output from the test (jdk1.2-fcs-J) ---------------------
Test passed
-------------------------------------------------
======================================================================
Name: mgC56079 Date: 09/24/98
The problem is more serious than described above.
getAvaliableLocales() methods of all classes now return an empty array.
==== Yet another test ====
import java.util.Locale;
public class LocaleTest {
public static void main(String[] args) {
System.out.println(Locale.getAvailableLocales().length);
}
}
==== Sample run ====
% java LocaleTest
0
======================================================================
- duplicates
-
JDK-4175039 In jdk1.2fcs-K, BreakIterator.getAvailableLocales() returns empty list
- Closed