Skip to content
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Mar 22, 2021
2 parents 41f57ce + 840ab7b commit 2667711b78cf40c8fa4702280525fd07da9817fb
Showing 1 changed file with 2 additions and 4 deletions.
@@ -43,9 +43,7 @@

public class PrintServiceLookupProvider extends PrintServiceLookup {

private String defaultPrinter;
private PrintService defaultPrintService;
private String[] printers; /* excludes the default printer */
private PrintService[] printServices; /* includes the default printer */

static {
@@ -114,7 +112,7 @@ public synchronized PrintService[] getPrintServices() {
}

private synchronized void refreshServices() {
printers = getAllPrinterNames();
String[] printers = getAllPrinterNames();
if (printers == null) {
// In Windows it is safe to assume no default if printers == null so we
// don't get the default.
@@ -279,7 +277,7 @@ public synchronized PrintService getDefaultPrintService() {

// Windows does not have notification for a change in default
// so we always get the latest.
defaultPrinter = getDefaultPrinterName();
String defaultPrinter = getDefaultPrinterName();
if (defaultPrinter == null) {
return null;
}

0 comments on commit 2667711

Please sign in to comment.