-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 1.4.0
-
Component/s: client-libs
-
beta2
-
sparc
-
solaris
-
Verified
print() method of DocPrintJob throws ClassCastException for some of the Media
attributes that are added to the HashPrintRequestAttributeSet.
Attached is a sample program and a gif file that the testcase tries to print using the Media attributes.
A media attribute(MediaName or MediaTray or MediaSizeName) is added to the HashPrintRequestAttribute and passed on to DocPrintJob for printing
The testcase when run throws the following exception:
java.lang.ClassCastException: javax.print.attribute.standard.MediaName
at sun.print.UnixPrintJob.getAttributeValues(UnixPrintJob.java:670)
at sun.print.UnixPrintJob.print(UnixPrintJob.java:301)
at MediaTest.printImage(MediaTest.java:166)
at MediaTest.<init>(MediaTest.java:34)
at MediaTest.main(MediaTest.java:176)
Source: MediaTest.java
Resource: TopLogo.gif