This is an automated email from the ASF dual-hosted git repository. zhaocong pushed a commit to branch branch-2.9 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit eed5bbd306a54e1b374abd91141f415e4f658a2f Author: 萧易客 <[email protected]> AuthorDate: Tue Nov 29 11:59:13 2022 +0800 [improve][broker] Make Consumer#equals more effective (#18662) (cherry picked from commit 9e821b015865edf4a661c1db34b89c7c8ab9f4de) --- .../src/main/java/org/apache/pulsar/broker/service/Consumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java index 2fea1a1b854..3bdf58a8ad2 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java @@ -842,7 +842,7 @@ public class Consumer { 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; }
