You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2014/09/20 20:22:36 UTC

[3/4] git commit: check for null

check for null


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/ee33dad3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/ee33dad3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/ee33dad3

Branch: refs/heads/two-dot-o
Commit: ee33dad397b4bcab2f7ac60719aaade797ee2f22
Parents: 5ff464b
Author: Shawn Feldman <sf...@apache.org>
Authored: Sat Sep 20 11:20:44 2014 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Sat Sep 20 11:20:44 2014 -0600

----------------------------------------------------------------------
 .../apache/usergrid/services/notifications/QueueListener.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ee33dad3/stack/services/src/main/java/org/apache/usergrid/services/notifications/QueueListener.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/QueueListener.java b/stack/services/src/main/java/org/apache/usergrid/services/notifications/QueueListener.java
index e4a6fa9..6821681 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/QueueListener.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/QueueListener.java
@@ -173,7 +173,9 @@ public class QueueListener  {
                             merge = Observable.merge(merge,current);
                         }
                     }
-                    merge.toBlocking().lastOrDefault(null);
+                    if(merge!=null) {
+                        merge.toBlocking().lastOrDefault(null);
+                    }
                     LOG.info("QueueListener: sent batch {} messages duration {} ms", messages.size(),System.currentTimeMillis() - now);
 
                     if(sleepBetweenRuns > 0) {