FULL PRODUCT VERSION :
JRE 1.6.0_07
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP version 5.1.2600
A DESCRIPTION OF THE PROBLEM :
I have noticed that the list of ISO 3166-1 codes listed in java.util.Locale is not complete. It contains 242 codes instead of 246 officially. The JE (Jersey) code is missing for example.
The following code returns 242 ISO codes
String[] isoCountries = java.util.Locale.getISOCountries();
System.out.println("nbr of ISO: "+isoCountries.length);
for(int i = 0; i<isoCountries.length;i++) {
System.out.println(isoCountries[i]);
}
nbr of ISO: 242
AD
AE
AF
....
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
String[] isoCountries = java.util.Locale.getISOCountries();
System.out.println("nbr of ISO: "+isoCountries.length);
for(int i = 0; i<isoCountries.length;i++) {
System.out.println(isoCountries[i]);
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
We should get 246 codes, but we get 242
nbr of ISO: 242
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Locale;
public class TestLocale {
/**
* @param args
*/
public static void main(String[] args) {
String[] isoCountries = java.util.Locale.getISOCountries();
System.out.println("nbr of ISO: "+isoCountries.length);
for(int i = 0; i<isoCountries.length;i++) {
System.out.println(isoCountries[i]);
}
}
}
---------- END SOURCE ----------