ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [29/40] ambari git commit: AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen)
Date Fri, 05 Feb 2016 21:56:44 GMT
AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/83bef413
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/83bef413
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/83bef413

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 83bef413c47c76cbf54bc64847620769168389ac
Parents: ed49229
Author: Dmytro Sen <dsen@apache.org>
Authored: Fri Feb 5 16:30:18 2016 +0200
Committer: Dmytro Sen <dsen@apache.org>
Committed: Fri Feb 5 16:30:18 2016 +0200

----------------------------------------------------------------------
 .../apache/ambari/server/controller/AmbariServer.java   | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/83bef413/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index c7e7880..b416129 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -794,10 +794,14 @@ public class AmbariServer {
   }
 
   public void stop() throws Exception {
-    try {
-      server.stop();
-    } catch (Exception e) {
-      LOG.error("Error stopping the server", e);
+    if (server == null) {
+      throw new AmbariException("Error stopping the server");
+    } else {
+      try {
+        server.stop();
+      } catch (Exception e) {
+        LOG.error("Error stopping the server", e);
+      }
     }
   }
 


Mime
View raw message