This is an automated email from the ASF dual-hosted git repository.

xiangying pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.10 by this push:
     new d2b39867efb [improve][broker] Make Consumer#equals more effective 
(#18662)
d2b39867efb is described below

commit d2b39867efb01d3e33981ea81e3db58fd72fa71d
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 bc7a8484f4d..f2cd77e485e 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
@@ -861,7 +861,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;
     }

Reply via email to