[OpenJDK 2D-Dev] [9] RFR JDK-8067059, , PrinterJob.pageDialog() with DialogSelectionType.NATIVE returns a PageFormat when cancelled.

prasanta sadhukhan prasanta.sadhukhan at oracle.com
Tue Nov 3 08:59:19 UTC 2015


Hi All,

Please review a fix for jdk9.

Bug: https://bugs.openjdk.java.net/browse/JDK-8067059
webrev: http://cr.openjdk.java.net/~psadhukhan/8067059/webrev.00/

The issue was if we "cancel" Printer Job setup dialog which has been 
created with DialogSelectionType.NATIVE
it should return "null" as per spec
https://docs.oracle.com/javase/8/docs/api/java/awt/print/PrinterJob.html#pageDialog-javax.print.attribute.PrintRequestAttributeSet-
/[If the user cancels the dialog, the attributes will not reflect any 
changes made by the user, and the return value will be null.]

/We were returning PageFormat instead. Fixed to return null in such case.

Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20151103/c336121b/attachment.html>


More information about the 2d-dev mailing list