-
Bug
-
Resolution: Fixed
-
P5
-
1.2.0
-
beta
-
sparc
-
solaris_2.6
Name: akC57697 Date: 02/05/99
java.lang.Character.Subset constructor does not throw NullPointerException
when called with null parameter.
javadoc for Character.Subset constructor is silent about handling null:
-------
protected Character.Subset(String name)
Constructs a new Subset instance.
Parameters:
name - The name of this subset
-------
However, null Subset name does not make any sense.
A test example which demonstrates this problem.
===== Test31.java ========
public class test31 {
public static void main (String argv[]) {
try {
MySubset s = new MySubset(null);
System.out.println("NullPointerException expected");
}
catch (NullPointerException npe) {
System.out.println("OKAY");
}
return;
}
}
class MySubset extends Character.Subset {
MySubset(String name) {
super(name);
}
}
========= Sample run (JDK1.2-fcs) ==========
#>java test31
NullPointerException expected
======================================================================