-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
1.2fcs
-
sparc
-
solaris_2.5
-
Verified
Name: sdC67446 Date: 08/10/98
The spec for
DataFlavor(String primaryType,
String subType,
MimeTypeParameterList params,
Class representationClass,
String humanPresentableName),
DataFlavor(Class representationClass,
String humanPresentableName),
DataFlavor(String mimeType,
String humanPresentableName)
doesn't specify behavior if parameter 'humanPresentableName' == null.
Currently ctors accept null values, but consequent call of
getHumanPresentableName() returns 'primaryType'+"/"+'subType'.
The doc says:
-------------------------------------------------------------
public DataFlavor(String primaryType,
String subType,
MimeTypeParameterList params,
Class representationClass,
String humanPresentableName)
Construct a fully specified DataFlavor
------------------------------------------------------------
The test demonstrating the bug:
import java.awt.datatransfer.*;
public class Test {
public static void main(String[] args) {
String mimeType = "application/postscript; class=java.lang.Integer";
String humanPresentableName = null;
DataFlavor df = new DataFlavor(mimeType,humanPresentableName);
System.out.println("-"+df.getHumanPresentableName());
}
}
------------------------------------------------------------
Test's output:
-application/postscript
======================================================================