changeset 23283:fbd991796648

8032227: ClassCastException in UnixPrintJob for ipp printer Reviewed-by: bae, jgodinez
author prr
date Wed, 05 Feb 2014 09:06:54 -0800
parents 3ea147eb359c
children 8d155a88e83d
files jdk/src/solaris/classes/sun/print/UnixPrintJob.java
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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) {