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/10/10 20:34:33 UTC

git commit: throw exception and don't throw null ref exception

Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o 389e766fb -> 693cb2d0e


throw exception and don't throw null ref 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/693cb2d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/693cb2d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/693cb2d0

Branch: refs/heads/two-dot-o
Commit: 693cb2d0e701bbde37a21a34a44a566906e12833
Parents: 389e766
Author: Shawn Feldman <sf...@apache.org>
Authored: Fri Oct 10 12:34:19 2014 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Fri Oct 10 12:34:19 2014 -0600

----------------------------------------------------------------------
 .../main/java/org/apache/usergrid/services/ServiceManager.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/693cb2d0/stack/services/src/main/java/org/apache/usergrid/services/ServiceManager.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/ServiceManager.java b/stack/services/src/main/java/org/apache/usergrid/services/ServiceManager.java
index 5885670..3b4e823 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/ServiceManager.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/ServiceManager.java
@@ -99,7 +99,10 @@ public class ServiceManager {
         if ( em != null ) {
             try {
                 application = em.getApplication();
-                applicationId = em.getApplication().getUuid();
+                if(application == null){
+                    throw new RuntimeException("application is returning null");
+                }
+                applicationId = application.getUuid();
             }
             catch ( Exception e ) {
                 logger.error( "This should never happen", e );