Skip to content
Snippets Groups Projects
Commit cc4f9c46 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

removed possible bug, which could lead to duplicated connections

parent 58d2c74e
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,6 @@ public class Connection<T> { ...@@ -23,7 +23,6 @@ public class Connection<T> {
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + capacity;
result = prime * result + ((sourcePort == null) ? 0 : sourcePort.hashCode()); result = prime * result + ((sourcePort == null) ? 0 : sourcePort.hashCode());
result = prime * result + ((targetPort == null) ? 0 : targetPort.hashCode()); result = prime * result + ((targetPort == null) ? 0 : targetPort.hashCode());
return result; return result;
...@@ -41,9 +40,6 @@ public class Connection<T> { ...@@ -41,9 +40,6 @@ public class Connection<T> {
return false; return false;
} }
Connection<?> other = (Connection<?>) obj; Connection<?> other = (Connection<?>) obj;
if (capacity != other.capacity) {
return false;
}
if (sourcePort == null) { if (sourcePort == null) {
if (other.sourcePort != null) { if (other.sourcePort != null) {
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment