Skip to content

Commit ab1bead

Browse files
committed
Rewrite hashCode method for SQLQueryError.java
1 parent f12c6e1 commit ab1bead

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/sqlancer/common/query/SQLQueryError.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package sqlancer.common.query;
22

3+
import java.util.Objects;
4+
35
public class SQLQueryError implements Comparable<SQLQueryError> {
46

57
public enum ErrorLevel {
@@ -65,6 +67,11 @@ public boolean equals(Object that) {
6567
return false;
6668
}
6769

70+
@Override
71+
public int hashCode() {
72+
return Objects.hash(level, code, message);
73+
}
74+
6875
@Override
6976
public String toString() {
7077
return String.format("Level: %s; Code: %d; Message: %s.", level, code, message);
@@ -106,4 +113,4 @@ public int compareTo(SQLQueryError that) {
106113

107114
return 0;
108115
}
109-
}
116+
}

0 commit comments

Comments
 (0)