ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional XMLValidateTask.java
Date Tue, 10 Jul 2001 14:55:53 GMT
conor       01/07/10 07:55:52

  Modified:    src/main/org/apache/tools/ant AntClassLoader.java
               src/main/org/apache/tools/ant/taskdefs Available.java
                        Definer.java Property.java SQLExec.java
               src/main/org/apache/tools/ant/taskdefs/optional
                        XMLValidateTask.java
  Log:
  CHange most usage of the classloader so that it loads from the
  system classpath first.
  
  Revision  Changes    Path
  1.23      +2 -4      jakarta-ant/src/main/org/apache/tools/ant/AntClassLoader.java
  
  Index: AntClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/AntClassLoader.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- AntClassLoader.java	2001/07/07 13:54:40	1.22
  +++ AntClassLoader.java	2001/07/10 14:55:22	1.23
  @@ -229,10 +229,6 @@
       public AntClassLoader(Project project, Path classpath) {
           this.project = project;
           this.classpath = classpath.concatSystemClasspath("ignore");
  -
  -        // JDK > 1.1 should add these by default, but some VMs don't
  -        addSystemPackageRoot("java");
  -        addSystemPackageRoot("javax");
       }
   
       /**
  @@ -244,6 +240,8 @@
       public AntClassLoader(Project project, Path classpath, boolean systemFirst) {
           this(project, classpath);
           this.systemFirst = systemFirst;
  +        addSystemPackageRoot("java");
  +        addSystemPackageRoot("javax");
       }
   
       /**
  
  
  
  1.21      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java
  
  Index: Available.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Available.java	2001/05/03 07:41:08	1.20
  +++ Available.java	2001/07/10 14:55:32	1.21
  @@ -137,7 +137,7 @@
           }
   
           if (classpath != null) {
  -            this.loader = new AntClassLoader(project, classpath, false);
  +            this.loader = new AntClassLoader(project, classpath);
           }
   
           if ((classname != null) && !checkClass(classname)) {
  
  
  
  1.4       +2 -7      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java
  
  Index: Definer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Definer.java	2001/07/09 14:47:51	1.3
  +++ Definer.java	2001/07/10 14:55:35	1.4
  @@ -96,17 +96,12 @@
               throw new BuildException(msg);
           }
           try {
  -            boolean systemFirst = false;
  -            String bscp = project.getProperty("build.sysclasspath");
  -            if (bscp != null && bscp.equals("only")) {
  -                systemFirst = true;
  -            }
               ClassLoader loader = null;
               AntClassLoader al = null;
               if (classpath != null) {
  -                al = new AntClassLoader(project, classpath, systemFirst);
  +                al = new AntClassLoader(project, classpath);
               } else {
  -                al = new AntClassLoader(project, Path.systemClasspath, systemFirst);
  +                al = new AntClassLoader(project, Path.systemClasspath);
               }
               // need to load Task via system classloader or the new
               // task we want to define will never be a Task but always
  
  
  
  1.26      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Property.java	2001/03/25 19:11:18	1.25
  +++ Property.java	2001/07/10 14:55:38	1.26
  @@ -214,7 +214,7 @@
               InputStream is = null;
   
               if (classpath != null) { 
  -                cL = new AntClassLoader(project, classpath, false); 
  +                cL = new AntClassLoader(project, classpath); 
               } else { 
                   cL = this.getClass().getClassLoader(); 
               } 
  
  
  
  1.20      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SQLExec.java	2001/07/07 10:22:23	1.19
  +++ SQLExec.java	2001/07/10 14:55:40	1.20
  @@ -366,7 +366,7 @@
                   log( "Loading " + driver + " using AntClassLoader with classpath " + classpath,

                        Project.MSG_VERBOSE );
   
  -                loader = new AntClassLoader(project, classpath, false);
  +                loader = new AntClassLoader(project, classpath);
                   dc = loader.loadClass(driver);
               }
               else {
  
  
  
  1.4       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java
  
  Index: XMLValidateTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLValidateTask.java	2001/05/10 15:22:51	1.3
  +++ XMLValidateTask.java	2001/07/10 14:55:48	1.4
  @@ -262,8 +262,8 @@
               //Class readerImpl = null;
               //Class parserImpl = null;
               if (classpath != null) {
  -                AntClassLoader loader = new AntClassLoader(project, classpath, false);
  -                loader.addSystemPackageRoot("org.xml"); // needed to avoid conflict
  +                AntClassLoader loader = new AntClassLoader(project, classpath);
  +//                loader.addSystemPackageRoot("org.xml"); // needed to avoid conflict
                   readerClass = loader.loadClass(readerClassName);
                   AntClassLoader.initializeClass(readerClass);
               } else 
  
  
  

Mime
View raw message