-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2fcs
-
sparc
-
solaris_2.5
-
Verified
Name: avC70361 Date: 06/10/98
The java.util.Locale.getISO3Language() works wrong for some codes which are
not ISO-639 language codes. It returns String result instead of throwing
MissingResourceException according to the specs: "Throws
MissingResourceException if the three-letter language abbreviation is not
available for this locale".
Here is a test demonstrating the bug.
---------------ISO3LanguageTest.java----------
import java.util.Locale;
import java.util.MissingResourceException;
public class ISO3LanguageTest {
public static void main(String args[]) {
Locale locale = new Locale("ttt", "");
try {
String result = locale.getISO3Language();
System.out.println(
"Failed: getISO3Language() returns wrong result : " + result + "\n" +
"for locale \"" + locale + "\""
);
} catch(MissingResourceException e) {
System.out.println("Passed");
}
}
}
----------The test example---------
> java ISO3LanguageTest
Failed: getISO3Language() returns wrong result : tat
for locale "ttt"
======================================================================