usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [10/33] git commit: fix null reference exception
Date Fri, 05 Sep 2014 21:11:13 GMT
fix null reference exception


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

Branch: refs/heads/two-dot-o
Commit: ed43ff9cc2a84f7e52c49e78e7f32fd6a8ceed9e
Parents: cb0e4b5
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Tue Aug 19 09:24:43 2014 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Tue Aug 19 09:24:43 2014 -0600

----------------------------------------------------------------------
 .../usergrid/services/notifications/NotificationsQueueManager.java | 2 +-
 .../apache/usergrid/services/notifications/apns/APNsAdapter.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ed43ff9c/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsQueueManager.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsQueueManager.java
b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsQueueManager.java
index 95dfb8e..e7ea96c 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsQueueManager.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsQueueManager.java
@@ -221,9 +221,9 @@ public class NotificationsQueueManager implements NotificationServiceProxy
{
         }
         notification.addProperties(properties);
         em.update(notification);
-        long elapsed = notification.getQueued() - startTime;
 
         if (LOG.isInfoEnabled()) {
+            long elapsed = notification.getQueued() != null ? notification.getQueued() -
startTime : 0;
             StringBuilder sb = new StringBuilder();
             sb.append("notification ").append(notification.getUuid());
             sb.append(" done queuing to ").append(deviceCount);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ed43ff9c/stack/services/src/main/java/org/apache/usergrid/services/notifications/apns/APNsAdapter.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/apns/APNsAdapter.java
b/stack/services/src/main/java/org/apache/usergrid/services/notifications/apns/APNsAdapter.java
index 73399c9..0f17dbe 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/apns/APNsAdapter.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/apns/APNsAdapter.java
@@ -161,7 +161,7 @@ public class APNsAdapter implements ProviderAdapter {
                 pushManager.start();
             }
         }catch(IllegalStateException ise){
-            logger.debug("failed to start",ise);//could have failed because its starteded
+            logger.debug("failed to start",ise);//could have failed because its started
         }
         return pushManager;
     }


Mime
View raw message