Ashutosh-Panda2004 opened a new pull request, #23788:
URL: https://github.com/apache/kafka/pull/23788

   The tail of hasUserEndpointChanged in GroupMetadataManager can be written as 
a single return. This:
   
   if (!hasPreviousUserEndpoint && !hasCurrentUserEndpoint) {
       return false;
   }
   
   return true;
   
   becomes return hasPreviousUserEndpoint || hasCurrentUserEndpoint;
   
   The method already returns early when both the previous and updated member 
have a user endpoint, so for the cases that reach this point the behavior is 
the same: neither present gives false, exactly one present gives true. I 
noticed this shape because the SimplifyBooleanReturn check in checkstyle flags 
it, and kafka enables that check in its own checkstyle config.
   
   I did not open a Jira for this since it is a small cleanup, happy to create 
one if you prefer.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to