- 
    Bug 
- 
    Resolution: Unresolved
- 
     P4 P4
- 
    None
- 
    1.1.8, 1.2.0
- 
        sparc
- 
        solaris_2.5
                    Name: mgC56079			Date: 05/26/99
Constructor DataFlavor(Class, String), with null Class parameter, throws
NullPointerException on jdk1.2.2 and passes without exceptions on jdk1.1.*.
It may confuse users and cause incomatibility.
Specification should explicitly define handling of the null parameter.
------------ Test.java
import java.awt.datatransfer.*;
public class Test {
public static void main(String[] args) {
try {
DataFlavor df = new DataFlavor((Class)null, "");
System.out.println("NPE was not thrown");
} catch (NullPointerException e) {
System.out.println("NPE was thrown");
}
}
}
------------ Output on 1.1.8
NPE was not thrown
------------ Output on 1.2.2
NPE was thrown
------------
======================================================================
            
Constructor DataFlavor(Class, String), with null Class parameter, throws
NullPointerException on jdk1.2.2 and passes without exceptions on jdk1.1.*.
It may confuse users and cause incomatibility.
Specification should explicitly define handling of the null parameter.
------------ Test.java
import java.awt.datatransfer.*;
public class Test {
public static void main(String[] args) {
try {
DataFlavor df = new DataFlavor((Class)null, "");
System.out.println("NPE was not thrown");
} catch (NullPointerException e) {
System.out.println("NPE was thrown");
}
}
}
------------ Output on 1.1.8
NPE was not thrown
------------ Output on 1.2.2
NPE was thrown
------------
======================================================================
- relates to
- 
                    JDK-4463573 java.awt.datatransfer.DataFlavor.match: null reaction needed -           
- Closed
 
-