< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java

Print this page

        

*** 176,191 **** if (attributes == null) { return; } - // See if this has an NSPrintInfo in it. - NSPrintInfo nsPrintInfo = (NSPrintInfo)attributes.get(NSPrintInfo.class); - if (nsPrintInfo != null) { - fNSPrintInfo = nsPrintInfo.getValue(); - } - PageRanges pageRangesAttr = (PageRanges)attributes.get(PageRanges.class); if (isSupportedValue(pageRangesAttr, attributes)) { SunPageSelection rangeSelect = (SunPageSelection)attributes.get(SunPageSelection.class); // If rangeSelect is not null, we are using AWT's print dialog that has // All, Selection, and Range radio buttons --- 176,185 ----
*** 561,573 **** --- 555,570 ---- // The following methods are CPrinterJob specific. @Override protected void finalize() { + synchronized (fNSPrintInfoLock) { if (fNSPrintInfo != -1) { dispose(fNSPrintInfo); } + fNSPrintInfo = -1; + } } private native long createNSPrintInfo(); private native void dispose(long printInfo);
< prev index next >