Effectively final.

This commit is contained in:
akwizgran
2017-11-17 15:40:54 +00:00
committed by Torsten Grote
parent a5b321a93b
commit d7383a3361
153 changed files with 1337 additions and 1396 deletions

View File

@@ -110,7 +110,7 @@ class WindowsShutdownManagerImpl extends ShutdownManagerImpl {
public void run() {
try {
// Load user32.dll
final User32 user32 = (User32) Native.loadLibrary("user32",
User32 user32 = (User32) Native.loadLibrary("user32",
User32.class, options);
// Create a callback to handle the WM_QUERYENDSESSION message
WindowProc proc = (hwnd, msg, wp, lp) -> {

View File

@@ -41,9 +41,9 @@ public class DesktopPluginModule extends PluginModule {
backoffFactory, shutdownManager);
SimplexPluginFactory removable =
new RemovableDrivePluginFactory(ioExecutor);
final Collection<SimplexPluginFactory> simplex =
Collection<SimplexPluginFactory> simplex =
Collections.singletonList(removable);
final Collection<DuplexPluginFactory> duplex =
Collection<DuplexPluginFactory> duplex =
Arrays.asList(bluetooth, modem, lan, wan);
@NotNullByDefault
PluginConfig pluginConfig = new PluginConfig() {

View File

@@ -204,18 +204,18 @@ class BluetoothPlugin implements DuplexPlugin {
}
@Override
public void poll(final Collection<ContactId> connected) {
public void poll(Collection<ContactId> connected) {
if (!running) return;
backoff.increment();
// Try to connect to known devices in parallel
Map<ContactId, TransportProperties> remote =
callback.getRemoteProperties();
for (Entry<ContactId, TransportProperties> e : remote.entrySet()) {
final ContactId c = e.getKey();
ContactId c = e.getKey();
if (connected.contains(c)) continue;
final String address = e.getValue().get(PROP_ADDRESS);
String address = e.getValue().get(PROP_ADDRESS);
if (StringUtils.isNullOrEmpty(address)) continue;
final String uuid = e.getValue().get(PROP_UUID);
String uuid = e.getValue().get(PROP_UUID);
if (StringUtils.isNullOrEmpty(uuid)) continue;
ioExecutor.execute(() -> {
if (!running) return;
@@ -270,7 +270,7 @@ class BluetoothPlugin implements DuplexPlugin {
// Make the device discoverable if possible
makeDeviceDiscoverable();
// Bind a server socket for receiving key agreementconnections
final StreamConnectionNotifier ss;
StreamConnectionNotifier ss;
try {
ss = (StreamConnectionNotifier) Connector.open(url);
} catch (IOException e) {