8032227: ClassCastException in UnixPrintJob for ipp printer
authorprr
Wed, 05 Feb 2014 09:06:54 -0800
changeset 23283 fbd991796648
parent 23282 3ea147eb359c
child 23284 8d155a88e83d
8032227: ClassCastException in UnixPrintJob for ipp printer Reviewed-by: bae, jgodinez
jdk/src/solaris/classes/sun/print/UnixPrintJob.java
--- 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) {