-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.5
Name: dfC67450 Date: 08/19/98
Javadoc says nothing about behaviour of
java.util.Locale.getDisplayName(Locale inLocale) in case of inLocale == null.
This behaviour is changed from jdk1.2Beta4K to jdk1.2fcs.
Here is the test demonstrating the bug:
-----------------Test.java------------------------
import java.util.*;
public class Test {
public static void main(String args[]) {
Locale locale = new Locale("", "", "");
System.out.println("getDisplayName(null): \"" +
locale.getDisplayName(null) + "\"");
}
}
---------Output from the test (JDK1.2-Beta4K) ---------------------
#> java -version
java version "1.2beta4"
Classic VM (build JDK-1.2beta4-K, green threads, sunwjit)
#> java Test
getDisplayName(null): ""
---------Output from the test (JDK1.2fcs) ---------------------
#> java -version
java version "1.2fcs"
Classic VM (build JDK-1.2fcs-F, green threads, sunwjit)
#> java Test
Exception in thread "main" java.lang.NullPointerException
at java.util.ResourceBundle.getBundle(Compiled Code)
at java.util.ResourceBundle.getBundle(Compiled Code)
at java.util.Locale.getDisplayName(Compiled Code)
at Test.main(Compiled Code)
-------------------------------------------------
======================================================================
I'm reassigning this to Alan Liu at Mark Son-Bell's suggestion.
dale.green@eng 1998-09-02