8066139: Null return from PrintJob.getGraphics() running closed/java/awt/PrintJob/HighResTest/HighResTest.java

Co-authored-by: Philip Race <philip.race@oracle.com>
Reviewed-by: prr, jdv
This commit is contained in:
Prasanta Sadhukhan 2016-03-16 15:00:57 +05:30
parent 23d01d22cd
commit e20ce427c2
3 changed files with 414 additions and 0 deletions

View file

@ -1212,6 +1212,7 @@ public abstract class RasterPrinterJob extends PrinterJob {
pageRangesAttr = (PageRanges)attributes.get(PageRanges.class);
if (!isSupportedValue(pageRangesAttr, attributes)) {
pageRangesAttr = null;
setPageRange(-1, -1);
} else {
if ((SunPageSelection)attributes.get(SunPageSelection.class)
== SunPageSelection.RANGE) {