Skip to content

Commit 4ef6f0b

Browse files
committed
#253 - oops - included code I used to help generate the hashcode / equals
1 parent 4afab48 commit 4ef6f0b

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/main/java/graphql/GraphQLError.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,6 @@ public interface GraphQLError {
2121
@SuppressWarnings("SimplifiableIfStatement")
2222
class Helper {
2323

24-
String message;
25-
List<SourceLocation> locations;
26-
ErrorType errorType;
27-
28-
@Override
29-
public boolean equals(Object o) {
30-
if (this == o) return true;
31-
if (o == null || getClass() != o.getClass()) return false;
32-
33-
Helper helper = (Helper) o;
34-
35-
if (message != null ? !message.equals(helper.message) : helper.message != null) return false;
36-
if (locations != null ? !locations.equals(helper.locations) : helper.locations != null) return false;
37-
return errorType == helper.errorType;
38-
}
39-
40-
@Override
41-
public int hashCode() {
42-
int result = message != null ? message.hashCode() : 0;
43-
result = 31 * result + (locations != null ? locations.hashCode() : 0);
44-
result = 31 * result + errorType.hashCode();
45-
return result;
46-
}
47-
4824
public static int hashCode(GraphQLError dis) {
4925
int result = dis.getMessage() != null ? dis.getMessage().hashCode() : 0;
5026
result = 31 * result + (dis.getLocations() != null ? dis.getLocations().hashCode() : 0);

0 commit comments

Comments
 (0)