You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/01 13:27:40 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #9400: op.cmd may be null, cause NPE

eolivelli commented on a change in pull request #9400:
URL: https://github.com/apache/pulsar/pull/9400#discussion_r567823637



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -1518,8 +1518,7 @@ private void stripChecksum(OpSendMsg op) {
                 headerFrame.resetReaderIndex();
             }
         } else {
-            log.warn("[{}] Failed while casting {} into ByteBufPair", producerName,
-                    (op.cmd == null ? null : op.cmd.getClass().getName()));
+            log.warn("[{}] Failed while casting {} into ByteBufPair", producerName, null);

Review comment:
       here you do not need to pass `null`, you can simply write `null` in the message




----------------------------------------------------------------
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:
users@infra.apache.org