You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2015/09/23 00:23:35 UTC

[10/50] storm git commit: [STORM-1051] Fix for flushMessagse NPE

[STORM-1051] Fix for flushMessagse NPE


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/8b845392
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/8b845392
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/8b845392

Branch: refs/heads/STORM-1040
Commit: 8b845392e920d753eb24fcffead0263416bc6227
Parents: 4523e54
Author: Michael Schonfeld <mi...@schonfeld.org>
Authored: Fri Sep 18 12:31:32 2015 -0400
Committer: Michael Schonfeld <mi...@schonfeld.org>
Committed: Fri Sep 18 12:31:32 2015 -0400

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/messaging/netty/Client.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/8b845392/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
index 08f5d2a..8e66193 100644
--- a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
+++ b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
@@ -317,7 +317,7 @@ public class Client extends ConnectionWithStatus implements IStatefulObject {
      * If the write operation fails, then we will close the channel and trigger a reconnect.
      */
     private void flushMessages(Channel channel, final MessageBatch batch) {
-        if(batch.isEmpty()){
+        if(null == batch || batch.isEmpty()){
             return;
         }