[jboss-cvs] JBossAS SVN: r83505 - projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jan 27 11:25:00 EST 2009


Author: alesj
Date: 2009-01-27 11:25:00 -0500 (Tue, 27 Jan 2009)
New Revision: 83505

Modified:
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
Log:
[JBDEPLOY-155]; fix how we remove classpath.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java	2009-01-27 15:36:36 UTC (rev 83504)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java	2009-01-27 16:25:00 UTC (rev 83505)
@@ -130,11 +130,8 @@
          }
          catch (Throwable t)
          {
-            List<VirtualFile> classPath = unit.getClassPath();
-            for (int i = added.size() - 1; i >=0; i--)
-            {
-               classPath.remove(added.get(i));
-            }
+            Collections.reverse(added);
+            unit.removeClassPath(added.toArray(new VirtualFile[added.size()]));
             throw DeploymentException.rethrowAsDeploymentException("Error adding integration path.", t);
          }
       }
@@ -145,13 +142,12 @@
    {
       if (isIntegrationDeployment(unit, metaData))
       {
-         List<VirtualFile> classPath = unit.getClassPath();
          for (URL integrationURL : integrationURLs)
          {
             try
             {
                VirtualFile integration = VFS.getRoot(integrationURL);
-               classPath.remove(integration);
+               unit.removeClassPath(integration);
             }
             catch (Throwable t)
             {




More information about the jboss-cvs-commits mailing list