diff options
Diffstat (limited to 'sca-java-2.x/contrib/modules/section10/src/main/java/org/apache')
-rw-r--r-- | sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java b/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java index 09675a1292..60b44588bf 100644 --- a/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java +++ b/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java @@ -163,12 +163,13 @@ public class Section10Impl implements Section10 { public List<String> removeContribution(String contributionURI) throws ActivationException {
List<String> removedContributionURIs = new ArrayList<String>();
- InstalledContribution ic = installedContributions.remove(contributionURI);
+ InstalledContribution ic = installedContributions.get(contributionURI);
if (ic != null) {
removedContributionURIs.add(ic.getURI());
for (String dependent : getDependentContributions(contributionURI)) {
removedContributionURIs.addAll(removeContribution(dependent));
}
+ installedContributions.remove(contributionURI);
for (DeployedComposite dc : ic.getDeployedComposites()) {
dc.unDeploy();
}
@@ -252,9 +253,11 @@ public class Section10Impl implements Section10 { }
Set<String> dependentContributionURIs = new HashSet<String>();
for (InstalledContribution icx : installedContributions.values()) {
- List<Contribution> dependencies = icx.getContribution().getDependencies();
- if (dependencies != null && dependencies.contains(ic.getContribution())) {
- dependentContributionURIs.addAll(getDependentContributions(icx.getURI()));
+ if (ic != icx) {
+ List<Contribution> dependencies = icx.getContribution().getDependencies();
+ if (dependencies != null && dependencies.contains(ic.getContribution())) {
+ dependentContributionURIs.addAll(getDependentContributions(icx.getURI()));
+ }
}
}
return dependentContributionURIs;
|