ijuma commented on a change in pull request #10764:
URL: https://github.com/apache/kafka/pull/10764#discussion_r640705924



##########
File path: clients/src/main/java/org/apache/kafka/server/authorizer/Action.java
##########
@@ -36,22 +36,22 @@ public Action(AclOperation operation,
                   int resourceReferenceCount,
                   boolean logIfAllowed,
                   boolean logIfDenied) {
-        this.operation = operation;
-        this.resourcePattern = resourcePattern;
+        this.operation = Objects.requireNonNull(operation, "operation can't be 
null");
+        this.resourcePattern = Objects.requireNonNull(resourcePattern, 
"resourcePattern can't be null");
         this.logIfAllowed = logIfAllowed;
         this.logIfDenied = logIfDenied;
         this.resourceReferenceCount = resourceReferenceCount;
     }
 
     /**
-     * Resource on which action is being performed.
+     * Resource on which action is being performed. never null

Review comment:
       I would include this in the sentence, "Returns a non-null resource 
pattern on which this action is being performed".




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


Reply via email to