You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/02/23 12:44:46 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #6398: [Minor] Fix java code errors reported by lgtm.

codelipenghui commented on a change in pull request #6398: [Minor] Fix java code errors reported by lgtm.
URL: https://github.com/apache/pulsar/pull/6398#discussion_r383000970
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -1756,6 +1756,14 @@ public int hashCode() {
         return Objects.hash(topic, subscription, consumerName);
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ConsumerImpl)) return false;
+        ConsumerImpl<?> consumer = (ConsumerImpl<?>) o;
+        return consumerId == consumer.consumerId;
 
 Review comment:
   Shall we need to add the topic name? because the consumer ID not globally unique

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services