You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/02/05 22:56:44 UTC
[29/40] ambari git commit: AMBARI-14928 Ambari throws NPE in kerberos
mode U14/S11 (dsen)
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 <ds...@apache.org>
Authored: Fri Feb 5 16:30:18 2016 +0200
Committer: Dmytro Sen <ds...@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);
+ }
}
}