Skip to content

Commit 52b727a

Browse files
authored
add hashCode to NoCredentials (#3216)
1 parent cfb0d01 commit 52b727a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

google-cloud-core/src/main/java/com/google/cloud/NoCredentials.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ public static NoCredentials getInstance() {
4040

4141
@Override
4242
public boolean equals(Object obj) {
43-
if (!(obj instanceof NoCredentials)) {
44-
return false;
45-
}
4643
return this == obj;
4744
}
45+
46+
@Override
47+
public int hashCode() {
48+
return System.identityHashCode(this);
49+
}
4850
}

0 commit comments

Comments
 (0)