You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/03/31 12:31:40 UTC
stratos git commit: Fix NPE when single cartridge app is deployed
Repository: stratos
Updated Branches:
refs/heads/master 6de22b176 -> 9e94e7bcb
Fix NPE when single cartridge app is deployed
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9e94e7bc
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9e94e7bc
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9e94e7bc
Branch: refs/heads/master
Commit: 9e94e7bcba83c246209c206f880434d1cff03c9d
Parents: 6de22b1
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Tue Mar 31 16:00:46 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Tue Mar 31 16:00:46 2015 +0530
----------------------------------------------------------------------
.../autoscaler/services/impl/AutoscalerServiceImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/9e94e7bc/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 9c2dee9..5dee5ca 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -252,10 +252,12 @@ public class AutoscalerServiceImpl implements AutoscalerService {
updateArtifactRepositoryList(artifactRepositoryList, cartridgeContexts);
}
- CartridgeContext[] cartridgeContextsOfGroups = getCartridgeContextsOfGroupsRecursively(
- components.getGroupContexts());
- if (cartridgeContextsOfGroups != null) {
- updateArtifactRepositoryList(artifactRepositoryList, cartridgeContextsOfGroups);
+ if(components.getGroupContexts() != null){
+ CartridgeContext[] cartridgeContextsOfGroups = getCartridgeContextsOfGroupsRecursively(
+ components.getGroupContexts());
+ if (cartridgeContextsOfGroups != null) {
+ updateArtifactRepositoryList(artifactRepositoryList, cartridgeContextsOfGroups);
+ }
}
ArtifactRepository[] artifactRepositoryArray = artifactRepositoryList.toArray(