From cc4f9c469839a8e30850ffcd6864ab4ea2938707 Mon Sep 17 00:00:00 2001 From: Nelson Tavares de Sousa <stu103017@mail.uni-kiel.de> Date: Thu, 11 Jun 2015 11:10:14 +0200 Subject: [PATCH] removed possible bug, which could lead to duplicated connections --- src/main/java/teetime/util/Connection.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/teetime/util/Connection.java b/src/main/java/teetime/util/Connection.java index 9fd714a1..c8e3740d 100644 --- a/src/main/java/teetime/util/Connection.java +++ b/src/main/java/teetime/util/Connection.java @@ -23,7 +23,6 @@ public class Connection<T> { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + capacity; result = prime * result + ((sourcePort == null) ? 0 : sourcePort.hashCode()); result = prime * result + ((targetPort == null) ? 0 : targetPort.hashCode()); return result; @@ -41,9 +40,6 @@ public class Connection<T> { return false; } Connection<?> other = (Connection<?>) obj; - if (capacity != other.capacity) { - return false; - } if (sourcePort == null) { if (other.sourcePort != null) { return false; -- GitLab