Commit 102103fe authored by Christian Schudt's avatar Christian Schudt

byte[].equals() should probably be Arrays.equals()

This is highlighted as "probably a bug" in my IDE.

E.g. `new byte[]{1}.equals(new byte[]{1})` is always false.
But `Arrays.equals(new byte[]{1}, new byte[]{1});` is true.
parent fbe74c8e
...@@ -1044,7 +1044,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust ...@@ -1044,7 +1044,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
serverLock.lock(); serverLock.lock();
List<String> remoteServerDomains = new ArrayList<>(); List<String> remoteServerDomains = new ArrayList<>();
for (Map.Entry<String, byte[]> entry : serversCache.entrySet()) { for (Map.Entry<String, byte[]> entry : serversCache.entrySet()) {
if (entry.getValue().equals(nodeID)) { if (Arrays.equals(entry.getValue(), nodeID)) {
remoteServerDomains.add(entry.getKey()); remoteServerDomains.add(entry.getKey());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment