Skip to content

Commit

Permalink
[improve][broker] Make Consumer#equals more effective (apache#18662)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9e821b0)
(cherry picked from commit d2b3986)
  • Loading branch information
Shawyeok authored and nicoloboschi committed Jan 11, 2023
1 parent e4ac214 commit d8b951b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ public CompletableFuture<Void> checkPermissionsAsync() {
public boolean equals(Object obj) {
if (obj instanceof Consumer) {
Consumer other = (Consumer) obj;
return Objects.equals(cnx.clientAddress(), other.cnx.clientAddress()) && consumerId == other.consumerId;
return consumerId == other.consumerId && Objects.equals(cnx.clientAddress(), other.cnx.clientAddress());
}
return false;
}
Expand Down

0 comments on commit d8b951b

Please sign in to comment.