ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r450614 - in /ant/core/trunk/src: main/org/apache/tools/ant/AntClassLoader.java tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java
Date Wed, 27 Sep 2006 22:46:58 GMT
Author: peterreilly
Date: Wed Sep 27 15:46:57 2006
New Revision: 450614

URL: http://svn.apache.org/viewvc?view=rev&rev=450614
Log:
revert 38747: resource isolation, should fix one of gumps issues - look at other later

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java?view=diff&rev=450614&r1=450613&r2=450614
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java Wed Sep 27 15:46:57 2006
@@ -32,7 +32,6 @@
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Hashtable;
-import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.Vector;
@@ -201,7 +200,7 @@
      *
      * @see #setIsolated(boolean)
      */
-    private boolean isolated = false;
+    private boolean ignoreBase = false;
 
     /**
      * The parent class loader, if one is given or can be determined.
@@ -567,7 +566,7 @@
      *                 isolated mode.
      */
     public synchronized void setIsolated(boolean isolated) {
-        this.isolated = isolated;
+        ignoreBase = isolated;
     }
 
     /**
@@ -849,6 +848,8 @@
         // designated to use a specific loader first
         // (this one or the parent one)
 
+        // XXX - shouldn't this always return false in isolated mode?
+
         boolean useParentFirst = parentFirst;
 
         for (Enumeration e = systemPackages.elements(); e.hasMoreElements();) {
@@ -952,8 +953,6 @@
         if (isParentFirst(name)) {
             // Normal case.
             return CollectionUtils.append(base, mine);
-        } else if (isolated) {
-            return mine;
         } else {
             // Inverted.
             return CollectionUtils.append(mine, base);
@@ -1059,7 +1058,7 @@
                 log("Class " + classname + " loaded from ant loader",
                     Project.MSG_DEBUG);
             } catch (ClassNotFoundException cnfe) {
-                if (isolated) {
+                if (ignoreBase) {
                     throw cnfe;
                 }
                 theClass = findBaseClass(classname);
@@ -1521,13 +1520,5 @@
     public String toString() {
         return "AntClassLoader[" + getClasspath() + "]";
     }
-
-    /**
-     * Accessor for derived classloaders to access the path components.
-     * @return the  pathcomponents.
-     */
-     protected List getPathComponents() {
-         return pathComponents;
-     }
 
 }

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java?view=diff&rev=450614&r1=450613&r2=450614
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java
(original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java
Wed Sep 27 15:46:57 2006
@@ -78,7 +78,7 @@
             enum2List(acl.getResources(TEST_RESOURCE)));
     }
 
-    public void testFindIsolateResources() throws Exception {
+    public void NottestFindIsolateResources() throws Exception {
         String buildTestcases = System.getProperty("build.tests");
         assertNotNull("defined ${build.tests}", buildTestcases);
         assertTrue("have a dir " + buildTestcases, new File(buildTestcases).isDirectory());



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message