incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject git commit: AMBARI-3846. Nagios alerts when returning bad json breaks the UI really badly. (swagle)
Date Thu, 21 Nov 2013 20:50:27 GMT
Updated Branches:
  refs/heads/trunk c778c7312 -> 071c9d471


AMBARI-3846. Nagios alerts when returning bad json breaks the UI really badly. (swagle)


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

Branch: refs/heads/trunk
Commit: 071c9d47111d76080250735ec6fcd81f25ffc229
Parents: c778c73
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Thu Nov 21 12:36:13 2013 -0800
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Thu Nov 21 12:50:20 2013 -0800

----------------------------------------------------------------------
 .../server/controller/internal/HttpProxyPropertyProvider.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/071c9d47/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HttpProxyPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HttpProxyPropertyProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HttpProxyPropertyProvider.java
index 99ccfc6..d39518c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HttpProxyPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HttpProxyPropertyProvider.java
@@ -25,6 +25,7 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
+import com.google.gson.JsonSyntaxException;
 import org.apache.ambari.server.configuration.ComponentSSLConfiguration;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.PropertyProvider;
@@ -136,6 +137,9 @@ public class HttpProxyPropertyProvider extends BaseProvider implements
PropertyP
     catch (IOException ioe) {
       LOG.error("Error reading HTTP response from " + url);
       r.setProperty(propertyIdToSet, null);
+    } catch (JsonSyntaxException jse) {
+      LOG.error("Error parsing HTTP response from " + url);
+      r.setProperty(propertyIdToSet, null);
     } finally {
       if (in != null) {
         try {


Mime
View raw message