Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping 5649e6ed4 -> 6a29d398e


fixing a compilation failure and a NPE


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5fa84a08
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5fa84a08
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5fa84a08

Branch: refs/heads/4.0.0-grouping
Commit: 5fa84a08fd7051be17652b8377b155aed53e9cc5
Parents: 13ef15c
Author: Isuru Haththotuwa <[email protected]>
Authored: Fri Sep 26 18:48:46 2014 +0530
Committer: Isuru Haththotuwa <[email protected]>
Committed: Fri Sep 26 18:48:46 2014 +0530

----------------------------------------------------------------------
 .../load/balancer/conf/LoadBalancerConfiguration.java    |  2 +-
 .../stratos/metadataservice/registry/CarbonRegistry.java | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/5fa84a08/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/LoadBalancerConfiguration.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/LoadBalancerConfiguration.java
 
b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/LoadBalancerConfiguration.java
index 3c6c5d1..c269419 100644
--- 
a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/LoadBalancerConfiguration.java
+++ 
b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/LoadBalancerConfiguration.java
@@ -441,7 +441,7 @@ public class LoadBalancerConfiguration {
 
                     for (Node clusterNode : clustersNode.getChildNodes()) {
                         String clusterId = clusterNode.getName();
-                        Cluster cluster = new 
Cluster(service.getServiceName(), clusterId, null, null);
+                        Cluster cluster = new 
Cluster(service.getServiceName(), clusterId, null, null, null);
 
                         String tenantRange = 
clusterNode.getProperty(Constants.CONF_PROPERTY_TENANT_RANGE);
                         if (StringUtils.isNotBlank(tenantRange)) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/5fa84a08/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java
 
b/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java
index d721c8b..98377c4 100644
--- 
a/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java
+++ 
b/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java
@@ -176,8 +176,15 @@ public class CarbonRegistry extends AbstractAdmin 
implements DataStore {
                                                                                
                   throws Exception {
                Registry registry = getGovernanceUserRegistry();
                String resourcePath = mainResource + applicationName + "/" + 
cartridgeType;
-               registry.delete(resourcePath);
-               return false;
+        if (registry != null) {
+                   registry.delete(resourcePath);
+            return true;
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug("Unable to delete the meta data since the Registry 
is NULL");
+            }
+            return false;
+        }
        }
 
 

Reply via email to