You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2014/02/12 10:50:19 UTC
git commit: fixing NPE while listing cartridges
Updated Branches:
refs/heads/master 3bea80658 -> 932c89eb8
fixing NPE while listing cartridges
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/932c89eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/932c89eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/932c89eb
Branch: refs/heads/master
Commit: 932c89eb848b36c8cf18e4152107fd363f0613cf
Parents: 3bea806
Author: rekathiru <rt...@gmail.com>
Authored: Wed Feb 12 15:20:40 2014 +0530
Committer: rekathiru <rt...@gmail.com>
Committed: Wed Feb 12 15:20:40 2014 +0530
----------------------------------------------------------------------
.../org/apache/stratos/rest/endpoint/services/ServiceUtils.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/932c89eb/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
index 49afe32..62e36f2 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
@@ -477,11 +477,12 @@ public class ServiceUtils {
cartridge.setDefaultDeploymentPolicy(cartridgeInfo.getDefaultDeploymentPolicy());
//cartridge.setStatus(CartridgeConstants.NOT_SUBSCRIBED);
cartridge.setCartridgeAlias("-");
- for(Property property: cartridgeInfo.getLbConfig().getProperties().getProperties()) {
+ if(cartridgeInfo.getLbConfig() != null && cartridgeInfo.getLbConfig().getProperties() != null) {
+ for(Property property: cartridgeInfo.getLbConfig().getProperties().getProperties()) {
if(property.getName().equals("load.balancer")) {
cartridge.setLoadBalancer(true);
}
-
+ }
}
//cartridge.setActiveInstances(0);
cartridges.add(cartridge);