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
Branches
Tags
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment