returns an empty clusterSet instead of null
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/c257ac85 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/c257ac85 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/c257ac85 Branch: refs/heads/master Commit: c257ac859fe39da2c26a08abbbc69606852e65b4 Parents: 2930e84 Author: Nirmal Fernando <[email protected]> Authored: Sat Feb 8 20:50:11 2014 +0530 Committer: Nirmal Fernando <[email protected]> Committed: Sat Feb 8 20:50:11 2014 +0530 ---------------------------------------------------------------------- .../manager/topology/model/TopologyClusterInformationModel.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/c257ac85/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java index b89a9d9..4037f70 100644 --- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java +++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java @@ -241,7 +241,7 @@ public class TopologyClusterInformationModel { Set<CartridgeTypeContext> cartridgeTypeContextSet = null; Set<SubscriptionAliasContext> subscriptionAliasContextSet = null; - Set<Cluster> clusterSet = null; + Set<Cluster> clusterSet = new HashSet<Cluster>(); readLock.lock(); try { @@ -263,7 +263,6 @@ public class TopologyClusterInformationModel { //iterate and convert to Cluster set Iterator<SubscriptionAliasContext> aliasCtxIterator = subscriptionAliasContextSet.iterator(); - clusterSet = new HashSet<Cluster>(); while (aliasCtxIterator.hasNext()) { Cluster cluster = aliasCtxIterator.next().getCluster(); // add the cluster to the set
