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 2019/06/12 15:49:34 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #4517: Fix NPE of ProducerInterceptors

jerrypeng commented on a change in pull request #4517: Fix NPE of ProducerInterceptors
URL: https://github.com/apache/pulsar/pull/4517#discussion_r292989554
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerInterceptors.java
 ##########
 @@ -64,8 +64,8 @@ public ProducerInterceptors(List<ProducerInterceptor<T>> interceptors) {
             try {
                 interceptorMessage = interceptors.get(i).beforeSend(producer, interceptorMessage);
             } catch (Exception e) {
-                if (message != null && producer != null) {
-                    log.warn("Error executing interceptor beforeSend callback for messageId: {}, topicName:{} ", message.getMessageId(), producer.getTopic(), e);
+                if (producer != null) {
 
 Review comment:
   I am confused on how this fixes an NPE?  You already check before if message is null? 

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


With regards,
Apache Git Services