atoomula commented on a change in pull request #1103: SAMZA-2270: Fix 
ConsoleLoggingSystemFactory to handle null message value.
URL: https://github.com/apache/samza/pull/1103#discussion_r302794107
 
 

 ##########
 File path: 
samza-tools/src/main/java/org/apache/samza/tools/ConsoleLoggingSystemFactory.java
 ##########
 @@ -85,7 +85,7 @@ public void register(String source) {
     @Override
     public void send(String source, OutgoingMessageEnvelope envelope) {
       String msg = String.format("OutputStream:%s Key:%s Value:%s", 
envelope.getSystemStream(), envelope.getKey(),
-          new String((byte[]) envelope.getMessage()));
+          envelope.getMessage() != null ? new String((byte[]) 
envelope.getMessage()) : null);
 
 Review comment:
   Good catch. Fixed it here as well. Thanks!

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


With regards,
Apache Git Services

Reply via email to