You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by pa...@apache.org on 2016/05/30 10:01:06 UTC
ambari git commit: AMBARI-16948. Not able to save custom config in
view config. (Gaurav Nagar via pallavkul)
Repository: ambari
Updated Branches:
refs/heads/trunk 17f764c00 -> 1e0e6f36e
AMBARI-16948. Not able to save custom config in view config. (Gaurav Nagar via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e0e6f36
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e0e6f36
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e0e6f36
Branch: refs/heads/trunk
Commit: 1e0e6f36e4e4581db4efc0ddfe8b9340d8334eca
Parents: 17f764c
Author: Pallav Kulshreshtha <pa...@gmail.com>
Authored: Mon May 30 15:30:08 2016 +0530
Committer: Pallav Kulshreshtha <pa...@gmail.com>
Committed: Mon May 30 15:30:08 2016 +0530
----------------------------------------------------------------------
.../controller/internal/ViewInstanceResourceProvider.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/1e0e6f36/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
index bdb1087..6035e13 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
@@ -351,8 +351,11 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
viewInstanceEntity.setIcon64((String) properties.get(ICON64_PATH_ID));
}
- if (properties.containsKey(CLUSTER_HANDLE_PROPERTY_ID)) {
- viewInstanceEntity.setClusterHandle(Long.valueOf((String) properties.get(CLUSTER_HANDLE_PROPERTY_ID)));
+ String handle = (String) properties.get(CLUSTER_HANDLE_PROPERTY_ID);
+ if (handle != null) {
+ viewInstanceEntity.setClusterHandle(Long.valueOf(handle));
+ } else {
+ viewInstanceEntity.setClusterHandle(null);
}
if (properties.containsKey(CLUSTER_TYPE_PROPERTY_ID)) {