8032227: ClassCastException in UnixPrintJob for ipp printer
Reviewed-by: bae, jgodinez
--- a/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Wed Feb 05 19:46:36 2014 +0400
+++ b/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Wed Feb 05 09:06:54 2014 -0800
@@ -409,7 +409,11 @@
((IPPPrintService)service).isIPPSupportedImages(
flavor.getMimeType()))) {
printableJob(new ImagePrinter(instream));
- ((UnixPrintService)service).wakeNotifier();
+ if (service instanceof IPPPrintService) {
+ ((IPPPrintService)service).wakeNotifier();
+ } else {
+ ((UnixPrintService)service).wakeNotifier();
+ }
return;
}
} catch (ClassCastException cce) {
@@ -430,7 +434,11 @@
instream = url.openStream();
} else {
printableJob(new ImagePrinter(url));
- ((UnixPrintService)service).wakeNotifier();
+ if (service instanceof IPPPrintService) {
+ ((IPPPrintService)service).wakeNotifier();
+ } else {
+ ((UnixPrintService)service).wakeNotifier();
+ }
return;
}
} catch (ClassCastException cce) {