-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_2.6
Name: dsR10051 Date: 06/28/2000
The behavior of the method
java.awt.datatransfer.StringSelection.getTransferData(DataFlavor flavor)
has been changed for null parameter.
In this case it throws UnsupportedFlavorException in merlin and
throws NullPointerException in kestrel.
It is the JCK regression, test case
api/java_awt/datatransfer/StringSelection/index.html#other
(JCK kestrel-fcs), should be fixed as bug or documented as
new feature.
Here is a minimized test:
import java.awt.datatransfer.*;
public class StringSelectionTest {
public static void main (String[] args) {
StringSelection selection = new StringSelection("TEST");
try {
selection.getTransferData((DataFlavor) null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
--- Output ---
%/set/java/jdk1.3/solaris/bin/java StringSelectionTest
java.lang.NullPointerException
at java.awt.datatransfer.StringSelection.getTransferData(StringSelection.java:97)
at StringSelectionTest.main(StringSelectionTest.java:8)
%/set/java/jdk1.4/solaris/bin/java StringSelectionTest
java.awt.datatransfer.UnsupportedFlavorException
at java.awt.datatransfer.StringSelection.getTransferData(StringSelection.java:106)
at StringSelectionTest.main(StringSelectionTest.java:8)
======================================================================