costin      2002/12/06 15:45:07

  Modified:    src/main/org/apache/tools/ant Project.java
  Log:
  Another small improvement - if the 'coreLoader' is set, try
  it before Class.forName().
  
  AFAIK nobody sets it right now. The 'only' system property is
  checked.
  
  I'll wait for the gump runs to see if anything breaks and revert
  the "lazy task creation" if it does.
  
  Revision  Changes    Path
  1.119     +11 -2     jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.118
  retrieving revision 1.119
  diff -u -r1.118 -r1.119
  --- Project.java      6 Dec 2002 23:29:19 -0000       1.118
  +++ Project.java      6 Dec 2002 23:45:07 -0000       1.119
  @@ -2114,7 +2114,16 @@
                   return null;
               }
               try {
  -                Class taskClass = Class.forName(value);
  +                Class taskClass=null;
  +                if( project.getCoreLoader() != null &&
  +                    
!("only".equals(project.getProperty("build.sysclasspath")))) {
  +                    try {
  +                        taskClass=project.getCoreLoader().loadClass(value);
  +                        if( taskClass != null ) return taskClass;
  +                    } catch( Exception ex ) {
  +                    }
  +                }
  +                taskClass = Class.forName(value);
                   return taskClass;
               } catch (NoClassDefFoundError ncdfe) {
                   project.log("Could not load a dependent class ("
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to