atom feed1 message in org.apache.tuscany.commitssvn commit: r949346 - /tuscany/sca-ja...
FromSent OnAttachments
ante...@apache.orgMay 29, 2010 12:48 am 
Subject:svn commit: r949346 - /tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
From:ante...@apache.org (ante@apache.org)
Date:May 29, 2010 12:48:04 am
List:org.apache.tuscany.commits

Author: antelder Date: Sat May 29 07:48:05 2010 New Revision: 949346

URL: http://svn.apache.org/viewvc?rev=949346&view=rev Log: Fix to correctly remove nested dependent contributions

Modified: tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java

Modified:
tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java?rev=949346&r1=949345&r2=949346&view=diff ============================================================================== ---
tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
(original) +++
tuscany/sca-java-2.x/contrib/modules/section10/src/main/java/org/apache/tuscany/sca/something/impl/Section10Impl.java
Sat May 29 07:48:05 2010 @@ -163,12 +163,13 @@ public class Section10Impl implements Se

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 Se } 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;