[jboss-cvs] JBossAS SVN: r95489 - in projects/jboss-deployers/trunk: deployers-spi/src/main/java/org/jboss/deployers/spi/deployer and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 23 08:46:44 EDT 2009
Author: alesj
Date: 2009-10-23 08:46:44 -0400 (Fri, 23 Oct 2009)
New Revision: 95489
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/main/MainDeployerImpl.java
projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/Deployers.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classpool/test/ClassPoolTest.java
Log:
[JBDEPLOY-218]; remove double revert.
TODO - add test for this.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/main/MainDeployerImpl.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/main/MainDeployerImpl.java 2009-10-23 12:38:05 UTC (rev 95488)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/main/MainDeployerImpl.java 2009-10-23 12:46:44 UTC (rev 95489)
@@ -47,7 +47,6 @@
import org.jboss.deployers.structure.spi.DeploymentContext;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.structure.spi.StructuralDeployers;
-import org.jboss.deployers.structure.spi.helpers.RevertedDeploymentContextComparator;
import org.jboss.deployers.structure.spi.main.MainDeployerInternals;
import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
import org.jboss.logging.Logger;
@@ -104,7 +103,6 @@
/** The top deployment context comparator */
private Comparator<DeploymentContext> comparator;
- private Comparator<DeploymentContext> reverted;
/** The re-deployments */
private final Map<String, Deployment> toRedeploy = Collections.synchronizedMap(new LinkedHashMap<String, Deployment>());
@@ -120,7 +118,6 @@
throw new IllegalArgumentException("Null comparator");
this.comparator = comparator;
- this.reverted = new RevertedDeploymentContextComparator(comparator);
}
/**
@@ -647,9 +644,9 @@
// Undeploy in reverse order (subdeployments first)
undeployContexts = new ArrayList<DeploymentContext>(undeploy);
undeploy.clear();
- Collections.reverse(undeployContexts);
- if (reverted != null)
- Collections.sort(undeployContexts, reverted);
+ // order as it was deployed, Deployers::process will revert it
+ if (comparator != null)
+ Collections.sort(undeployContexts, comparator);
}
if (undeployContexts != null)
Modified: projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/Deployers.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/Deployers.java 2009-10-23 12:38:05 UTC (rev 95488)
+++ projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/Deployers.java 2009-10-23 12:46:44 UTC (rev 95489)
@@ -49,6 +49,8 @@
/**
* Process deployment
+ *
+ * Note: the undeploy list must be undeployed in reverse order.
*
* @param deploy the deployments to deploy
* @param undeploy the deployments to remove
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classpool/test/ClassPoolTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classpool/test/ClassPoolTest.java 2009-10-23 12:38:05 UTC (rev 95488)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classpool/test/ClassPoolTest.java 2009-10-23 12:46:44 UTC (rev 95489)
@@ -105,7 +105,7 @@
protected DeploymentUnit getDeploymentUnit(DeploymentUnit parent, String name)
{
- if (name == null)
+ if (name == null || "".equals(name))
return parent;
return assertChild(parent, name);
More information about the jboss-cvs-commits
mailing list