< prev index next >
src/java.desktop/windows/classes/sun/print/PrintServiceLookupProvider.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -354,14 +354,14 @@
defaultPrintService = new Win32PrintService(defaultPrinter);
}
return defaultPrintService;
}
- class PrinterChangeListener implements Runnable {
- long chgObj;
- PrinterChangeListener() {
- chgObj = notifyFirstPrinterChange(null);
+ private final class PrinterChangeListener implements Runnable {
+ private final long chgObj;
+ private PrinterChangeListener() {
+ chgObj = notifyFirstPrinterChange();
}
@Override
public void run() {
if (chgObj != -1) {
@@ -444,10 +444,10 @@
}
}
private native String getDefaultPrinterName();
private native String[] getAllPrinterNames();
- private native long notifyFirstPrinterChange(String printer);
+ private native long notifyFirstPrinterChange();
private native void notifyClosePrinterChange(long chgObj);
private native int notifyPrinterChange(long chgObj);
private native String[] getRemotePrintersNames();
}
< prev index next >