We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6969e2f commit fbd9007Copy full SHA for fbd9007
1 file changed
src/main/java/info/debatty/java/graphs/Neighbor.java
@@ -71,6 +71,10 @@ public int hashCode() {
71
72
@Override
73
public int compareTo(Object other) {
74
+ if (other == null) {
75
+ return 1;
76
+ }
77
+
78
if (!other.getClass().isInstance(this)) {
79
throw new InvalidParameterException();
80
}
0 commit comments