Skip to content

Commit a317e4e

Browse files
PatrickPenguinTurtleJLLeitschuh
authored andcommitted
Fixes Issue #634 (#638)
* Fixes Issue #634 InputSocket.Decorated equals method never checked if the other socket was also a Decorated.
1 parent cbac40b commit a317e4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/src/main/java/edu/wpi/grip/core/sockets/InputSocket.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ public void onValueChanged() {
114114

115115
@Override
116116
public boolean equals(Object o) {
117-
return o instanceof InputSocket && decorated.equals(o);
117+
if (decorated.equals(o)) {
118+
return true;
119+
} else if (o instanceof Decorator) {
120+
return decorated.equals(((Decorator) o).decorated);
121+
}
122+
return false;
118123
}
119124

120125
@Override

0 commit comments

Comments
 (0)