ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional TaskDiscovery.java
Date Fri, 11 Oct 2002 18:25:34 GMT
costin      2002/10/11 11:25:34

  Modified:    proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional
                        TaskDiscovery.java
  Log:
  Update to the current commons-discovery API
  
  Revision  Changes    Path
  1.2       +6 -7      jakarta-ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional/TaskDiscovery.java
  
  Index: TaskDiscovery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional/TaskDiscovery.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TaskDiscovery.java	11 Oct 2002 18:19:33 -0000	1.1
  +++ TaskDiscovery.java	11 Oct 2002 18:25:34 -0000	1.2
  @@ -60,10 +60,9 @@
   
   import java.util.*;
   
  -import org.apache.commons.discovery.ResourceName;
  -import org.apache.commons.discovery.ResourceNameIterator;
  +import org.apache.commons.discovery.*;
   import org.apache.commons.discovery.jdk.JDKHooks;
  -import org.apache.commons.discovery.resource.DiscoverResources;
  +import org.apache.commons.discovery.resource.*;
   
   
   /**
  @@ -82,7 +81,7 @@
       // Also discovery the 'legacy' names - in ant1.6 the initial preloaded tasks
       // should be deprecated.
       
  -    ResourceName[] discoveredTasks = null;
  +    Resource[] discoveredTasks = null;
   
       Hashtable taskDefs=new Hashtable();
   
  @@ -126,18 +125,18 @@
           disc.addClassLoader( JDKHooks.getJDKHooks().getThreadContextClassLoader() );
           disc.addClassLoader( this.getClass().getClassLoader() );
           
  -        ResourceNameIterator enum = disc.findResources(RESOURCE_NAME);
  +        ResourceIterator enum = disc.findResources(RESOURCE_NAME);
           
           Vector vector = new Vector();
           while (enum.hasNext()) {
  -            ResourceName resourceInfo = enum.nextResourceName();
  +            Resource resourceInfo = enum.nextResource();
               vector.add(resourceInfo);
               System.out.println("Found " + resourceInfo);
   
               
           }
           
  -        discoveredTasks = new ResourceName[vector.size()];
  +        discoveredTasks = new Resource[vector.size()];
           vector.copyInto(discoveredTasks);
       }
           
  
  
  

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


Mime
View raw message