-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
5.0
-
generic
-
generic
Calling PrinterJob.print() without setting a valid printable throws exception on 1.4.2 on Solaris and win32 saying 'no page or printable exists'. But the same application does not throw any exception on Tiger/Mustang and proceeds fine. Although this is considered to be an user error, it would be good to retain 1.4.2 behavior on upcoming releases where we notify the application that there are no pages to print.
Here is the exception thrown on 1.4.2:
java.awt.print.PrinterException: No page or printable exists.
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1370)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1065)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:966)
at FrameDisposeTest.main(FrameDisposeTest.java:16)
This is reproducible on Mustang as well as Tiger, on Win32 as well as Solaris.
Run the attached test and click 'OK' on the print dialog. If you don't see any exception, the bug is reproduced.
Here is the exception thrown on 1.4.2:
java.awt.print.PrinterException: No page or printable exists.
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1370)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1065)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:966)
at FrameDisposeTest.main(FrameDisposeTest.java:16)
This is reproducible on Mustang as well as Tiger, on Win32 as well as Solaris.
Run the attached test and click 'OK' on the print dialog. If you don't see any exception, the bug is reproduced.