You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/07/12 00:56:31 UTC

[GitHub] [samza] atoomula commented on a change in pull request #1103: SAMZA-2270: Fix ConsoleLoggingSystemFactory to handle null message value.

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


With regards,
Apache Git Services