-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2.2
-
sparc
-
solaris_2.5
Name: sdC67446 Date: 10/15/98
The method DataFlavor.clone() throws NullPointerException
if class instance was created with constructor DataFlavor().
The doc says:
--------------------------------------------------
public Object clone()
throws CloneNotSupportedException
Returns:
a clone of this DataFlavor
Overrides:
clone in class Object
The test demonstrating the bug:
-----------------Test.java------------------------
import java.awt.datatransfer.*;
public class Test {
public static void main(String[] args) {
try {
DataFlavor df1 = new DataFlavor();
Object df2 = df1.clone();
} catch (CloneNotSupportedException e) {
System.out.println("unexpected exception: "+e);
}
}
}
---------Output from the test---------------------
Exception in thread "main" java.lang.NullPointerException
at java.awt.datatransfer.DataFlavor.clone(Compiled Code)
at Test.main(Compiled Code)
--------------------------------------------------
======================================================================