borisssmidtCET commented on code in PR #14597:
URL: https://github.com/apache/kafka/pull/14597#discussion_r1415314693


##########
clients/src/main/java/org/apache/kafka/common/security/auth/KafkaPrincipal.java:
##########
@@ -53,7 +53,12 @@ public KafkaPrincipal(String principalType, String name) {
     }
 
     public KafkaPrincipal(String principalType, String name, boolean 
tokenAuthenticated) {
-        this.principalType = requireNonNull(principalType, "Principal type 
cannot be null");
+        //Sharing USER_TYPE reference.
+        if (principalType.equals(USER_TYPE)) {

Review Comment:
   This moved the equals check to the initialization of the object. instead of 
the check itself. 



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