Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
remove never used Domains.myHostNames set
reger3adb670f448d
diff --git a/source/net/yacy/cora/protocol/Domains.java b/source/net/yacy/cora/protocol/Domains.javaindex 10dc7b360..5f25eeb06 100644--- a/source/net/yacy/cora/protocol/Domains.java+++ b/source/net/yacy/cora/protocol/Domains.java@@ -100,12 +100,10 @@ public class Domains {private static Set<InetAddress> localHostAddresses = new HashSet<InetAddress>(); // subset of myHostAddressesprivate static Set<InetAddress> publicIPv4HostAddresses = new HashSet<InetAddress>(); // subset of myHostAddressesprivate static Set<InetAddress> publicIPv6HostAddresses = new HashSet<InetAddress>(); // subset of myHostAddresses- private static Set<String> myHostNames = new HashSet<String>();private static Set<String> localHostNames = new HashSet<String>(); // subset of myHostNamesprivate static Set<String> publicIPv4HostNames = new HashSet<String>(); // subset of myHostNamesprivate static Set<String> publicIPv6HostNames = new HashSet<String>(); // subset of myHostNamesstatic {- myHostNames.add(LOCALHOST);localHostNames.add(LOCALHOST);try {InetAddress localHostAddress = InetAddress.getLocalHost();@@ -166,8 +164,6 @@ public class Domains {}hns.add(hostaddressP);final String hostname = getHostName(a);- if (hostname != null) myHostNames.add(hostname);- myHostNames.addAll(hns);for (String hostaddress: hns) {if (hostaddress.contains("::0:") || hostaddress.contains(":0::")) continue; // not common (but possible); we skip that// we write the local tests into variables to be able to debug these values@@ -986,9 +982,7 @@ public class Domains {// add also the isLocal host name cachesfinal boolean localp = ip.isAnyLocalAddress() || ip.isLinkLocalAddress() || ip.isSiteLocalAddress();- if (localp) {- myHostNames.add(host);- } else {+ if (!localp) {if (globalHosts != null) try {globalHosts.add(host);} catch (final IOException e) {}