Skip to content

Commit 3c3468d

Browse files
authored
Update GenericData.java
1 parent fbc0256 commit 3c3468d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

google-http-client/src/main/java/com/google/api/client/util/GenericData.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ public final void setUnknownKeys(Map<String, Object> unknownFields) {
199199

200200
@Override
201201
public boolean equals(Object o) {
202-
if (!(o instanceof GenericData)) {
202+
if (o == this) {
203+
return true;
204+
}
205+
if (o == null || !(o instanceof GenericData)) {
203206
return false;
204207
}
205208
GenericData that = (GenericData) o;

0 commit comments

Comments
 (0)