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

@@ -45,7 +45,7 @@ public class AndroidPluginModule {
backoffFactory);
DuplexPluginFactory lan = new AndroidLanTcpPluginFactory(ioExecutor,
backoffFactory, appContext);
final Collection<DuplexPluginFactory> duplex =
Collection<DuplexPluginFactory> duplex =
Arrays.asList(bluetooth, tor, lan);
@NotNullByDefault
PluginConfig pluginConfig = new PluginConfig() {

View File

@@ -285,11 +285,11 @@ class DroidtoothPlugin implements DuplexPlugin, EventListener {
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;

View File

@@ -400,7 +400,7 @@ class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
}
socket = ss;
// Store the port number
final String localPort = String.valueOf(ss.getLocalPort());
String localPort = String.valueOf(ss.getLocalPort());
Settings s = new Settings();
s.put(PREF_TOR_PORT, localPort);
callback.mergeSettings(s);
@@ -536,8 +536,7 @@ class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
}
}
private void connectAndCallBack(final ContactId c,
final TransportProperties p) {
private void connectAndCallBack(ContactId c, TransportProperties p) {
ioExecutor.execute(() -> {
if (!isRunning()) return;
DuplexTransportConnection d = createConnection(p);