Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit 611f277

Browse files
authored
Fix HttpJsonCallContext has incorrect equals & hashCode implementation (#615)
(#479)
1 parent ff4d82b commit 611f277

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,16 @@ public boolean equals(Object o) {
245245
if (o == null || getClass() != o.getClass()) {
246246
return false;
247247
}
248-
249-
return true;
248+
HttpJsonCallContext that = (HttpJsonCallContext) o;
249+
return Objects.equals(channel, that.channel)
250+
&& Objects.equals(timeout, that.timeout)
251+
&& Objects.equals(deadline, that.deadline)
252+
&& Objects.equals(credentials, that.credentials)
253+
&& Objects.equals(extraHeaders, that.extraHeaders);
250254
}
251255

252256
@Override
253257
public int hashCode() {
254-
return Objects.hash();
258+
return Objects.hash(channel, timeout, deadline, credentials, extraHeaders);
255259
}
256260
}

0 commit comments

Comments
 (0)