ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant Project.java
Date Mon, 10 Jan 2005 23:44:57 GMT
jkf         2005/01/10 15:44:57

  Modified:    src/main/org/apache/tools/ant Project.java
  Log:
  Minor update to remove jdk1.1 workaround
  
  Revision  Changes    Path
  1.182     +4 -34     ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.181
  retrieving revision 1.182
  diff -u -r1.181 -r1.182
  --- Project.java	6 Jan 2005 12:05:06 -0000	1.181
  +++ Project.java	10 Jan 2005 23:44:57 -0000	1.182
  @@ -33,6 +33,7 @@
   import java.util.HashSet;
   import org.apache.tools.ant.input.DefaultInputHandler;
   import org.apache.tools.ant.input.InputHandler;
  +import org.apache.tools.ant.loader.AntClassLoader2;
   import org.apache.tools.ant.helper.DefaultExecutor;
   import org.apache.tools.ant.helper.KeepGoingExecutor;
   import org.apache.tools.ant.types.FilterSet;
  @@ -81,13 +82,6 @@
       private static final String VISITED = "VISITED";
   
       /**
  -     * The class name of the Ant class loader to use for
  -     * JDK 1.2 and above
  -     */
  -    private static final String ANTCLASSLOADER_JDK12
  -        = "org.apache.tools.ant.loader.AntClassLoader2";
  -
  -    /**
        * Version constant for Java 1.0
        *
        * @deprecated Use {@link JavaEnvUtils#JAVA_1_0} instead.
  @@ -269,31 +263,6 @@
       }
   
       /**
  -     * Factory method to create a class loader for loading classes
  -     *
  -     * @return an appropriate classloader
  -     */
  -    private AntClassLoader createClassLoader() {
  -        AntClassLoader loader = null;
  -        try {
  -            // 1.2+ - create advanced helper dynamically
  -            Class loaderClass
  -                    = Class.forName(ANTCLASSLOADER_JDK12);
  -            loader = (AntClassLoader) loaderClass.newInstance();
  -        } catch (Exception e) {
  -            log("Unable to create Class Loader: "
  -                    + e.getMessage(), Project.MSG_DEBUG);
  -        }
  -
  -        if (loader == null) {
  -            loader = new AntClassLoader();
  -        }
  -
  -        loader.setProject(this);
  -        return loader;
  -    }
  -
  -    /**
        * Factory method to create a class loader for loading classes from
        * a given path
        *
  @@ -302,7 +271,8 @@
        * @return an appropriate classloader
        */
       public AntClassLoader createClassLoader(Path path) {
  -        AntClassLoader loader = createClassLoader();
  +        AntClassLoader loader = new AntClassLoader2();
  +        loader.setProject(this);
           loader.setClassPath(path);
           return loader;
       }
  
  
  

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


Mime
View raw message