jsancio commented on code in PR #13668:
URL: https://github.com/apache/kafka/pull/13668#discussion_r1184012897


##########
metadata/src/main/java/org/apache/kafka/controller/ControllerMetricsManager.java:
##########
@@ -202,10 +202,10 @@ private void handleFencingChange(Integer brokerId, 
BrokerRegistrationFencingChan
             throw new IllegalArgumentException(String.format("Broker with id 
%s is not registered", brokerId));
         }
 
-        if (fencingChange == BrokerRegistrationFencingChange.FENCE) {
+        if (fencingChange.equals(BrokerRegistrationFencingChange.FENCE)) {
             fencedBrokers.add(brokerId);
             updateBrokerStateMetrics();
-        } else if (fencingChange == BrokerRegistrationFencingChange.UNFENCE) {
+        } else if 
(fencingChange.equals(BrokerRegistrationFencingChange.UNFENCE)) {

Review Comment:
   Yes. These cahnges are not needed.



##########
metadata/src/main/java/org/apache/kafka/controller/ControllerMetricsManager.java:
##########
@@ -202,10 +202,10 @@ private void handleFencingChange(Integer brokerId, 
BrokerRegistrationFencingChan
             throw new IllegalArgumentException(String.format("Broker with id 
%s is not registered", brokerId));
         }
 
-        if (fencingChange == BrokerRegistrationFencingChange.FENCE) {
+        if (fencingChange.equals(BrokerRegistrationFencingChange.FENCE)) {
             fencedBrokers.add(brokerId);
             updateBrokerStateMetrics();
-        } else if (fencingChange == BrokerRegistrationFencingChange.UNFENCE) {
+        } else if 
(fencingChange.equals(BrokerRegistrationFencingChange.UNFENCE)) {

Review Comment:
   Yes. These changes are not needed.



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to