adoroszlai commented on code in PR #9449:
URL: https://github.com/apache/ozone/pull/9449#discussion_r2595127115


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/token/BlockTokenVerifier.java:
##########
@@ -71,8 +71,8 @@ protected OzoneBlockTokenIdentifier createTokenIdentifier() {
   @Override
   protected Object getService(ContainerCommandRequestProtoOrBuilder cmd) {
     BlockID blockID = HddsUtils.getBlockID(cmd);
-    Preconditions.checkNotNull(blockID,
-        "no blockID in %s command", cmd.getCmdType());
+    Objects.requireNonNull(blockID,
+        String.format("no blockID in %s command", cmd.getCmdType()));

Review Comment:
   Message should be lazily formatted.
   
   ```suggestion
       Objects.requireNonNull(blockID, () -> "blockID == null in command " + 
cmd.getCmdType());
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to