[jbossws-commits] JBossWS SVN: r16162 - container/jboss70/branches/jbossws-jboss702/src/main/java/org/jboss/as/webservices/tests.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Mon Apr 16 04:16:13 EDT 2012
Author: alessio.soldano at jboss.com
Date: 2012-04-16 04:16:12 -0400 (Mon, 16 Apr 2012)
New Revision: 16162
Modified:
container/jboss70/branches/jbossws-jboss702/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
Log:
[JBWS-3482] Prevent RemoteDeployer from messing up tests result by failing to undeploy archives which previously failed to deploy
Modified: container/jboss70/branches/jbossws-jboss702/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
===================================================================
--- container/jboss70/branches/jbossws-jboss702/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java 2012-04-13 13:17:26 UTC (rev 16161)
+++ container/jboss70/branches/jbossws-jboss702/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java 2012-04-16 08:16:12 UTC (rev 16162)
@@ -95,12 +95,17 @@
public void undeploy(final URL archiveURL) throws Exception {
synchronized (archiveCounters) {
String k = archiveURL.toString();
- int count = archiveCounters.get(k);
- if (count > 1) {
- archiveCounters.put(k, (count - 1));
+ if (archiveCounters.containsKey(k)) {
+ int count = archiveCounters.get(k);
+ if (count > 1) {
+ archiveCounters.put(k, (count - 1));
+ return;
+ } else {
+ archiveCounters.remove(k);
+ }
+ } else {
+ LOGGER.warn("Trying to undeploy archive " + archiveURL + " which is not currently deployed!");
return;
- } else {
- archiveCounters.remove(k);
}
final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
More information about the jbossws-commits
mailing list