From 16af0a9ce23abbe2efce8ea950107b3e8bc3c0f8 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 3 May 2017 08:25:14 -0400 Subject: [PATCH] Remove unnecessary field from UnicastZenPing This field was only ever used in the constructor, where it was set and then passed around. As such, there's no need for it to be a field and we can remove it. --- .../java/org/elasticsearch/discovery/zen/UnicastZenPing.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/discovery/zen/UnicastZenPing.java b/core/src/main/java/org/elasticsearch/discovery/zen/UnicastZenPing.java index f6f5bafa275..efb537e7520 100644 --- a/core/src/main/java/org/elasticsearch/discovery/zen/UnicastZenPing.java +++ b/core/src/main/java/org/elasticsearch/discovery/zen/UnicastZenPing.java @@ -111,8 +111,6 @@ public class UnicastZenPing extends AbstractComponent implements ZenPing { private final TransportService transportService; private final ClusterName clusterName; - private final int concurrentConnects; - private final List configuredHosts; private final int limitPortCounts; @@ -145,7 +143,7 @@ public class UnicastZenPing extends AbstractComponent implements ZenPing { this.clusterName = ClusterName.CLUSTER_NAME_SETTING.get(settings); this.hostsProvider = unicastHostsProvider; - this.concurrentConnects = DISCOVERY_ZEN_PING_UNICAST_CONCURRENT_CONNECTS_SETTING.get(settings); + final int concurrentConnects = DISCOVERY_ZEN_PING_UNICAST_CONCURRENT_CONNECTS_SETTING.get(settings); if (DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.exists(settings)) { configuredHosts = DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.get(settings); // we only limit to 1 addresses, makes no sense to ping 100 ports