commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/discovery/src/java/org/apache/commons/discovery/ant ServiceDiscoveryTask.java
Date Wed, 08 Jan 2003 01:52:18 GMT
dion        2003/01/07 17:52:18

  Modified:    discovery/src/java/org/apache/commons/discovery/log
                        DiscoveryLogFactory.java
               discovery/src/java/org/apache/commons/discovery/resource/classes
                        DiscoverClasses.java
               discovery/src/java/org/apache/commons/discovery/resource/names
                        DiscoverMappedNames.java
                        DiscoverNamesInDictionary.java
               discovery/src/java/org/apache/commons/discovery
                        ResourceClass.java
               discovery/src/java/org/apache/commons/discovery/tools
                        SPInterface.java DiscoverSingleton.java
               discovery/src/java/org/apache/commons/discovery/ant
                        ServiceDiscoveryTask.java
  Log:
  Code cleanup - tests still dont pass under Maven
  
  Revision  Changes    Path
  1.3       +0 -1      jakarta-commons/discovery/src/java/org/apache/commons/discovery/log/DiscoveryLogFactory.java
  
  Index: DiscoveryLogFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/log/DiscoveryLogFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DiscoveryLogFactory.java	28 Aug 2002 02:49:50 -0000	1.2
  +++ DiscoveryLogFactory.java	8 Jan 2003 01:52:17 -0000	1.3
  @@ -63,7 +63,6 @@
   package org.apache.commons.discovery.log;
   
   import java.lang.reflect.Method;
  -import java.lang.reflect.Modifier;
   import java.util.Enumeration;
   import java.util.Hashtable;
   
  
  
  
  1.3       +0 -3      jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java
  
  Index: DiscoverClasses.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DiscoverClasses.java	30 Aug 2002 22:19:33 -0000	1.2
  +++ DiscoverClasses.java	8 Jan 2003 01:52:17 -0000	1.3
  @@ -60,12 +60,9 @@
   import java.net.URL;
   import java.util.Vector;
   
  -import org.apache.commons.discovery.Resource;
   import org.apache.commons.discovery.ResourceClass;
   import org.apache.commons.discovery.ResourceClassDiscover;
   import org.apache.commons.discovery.ResourceClassIterator;
  -import org.apache.commons.discovery.ResourceIterator;
  -import org.apache.commons.discovery.ResourceNameIterator;
   import org.apache.commons.discovery.log.DiscoveryLogFactory;
   import org.apache.commons.discovery.resource.ClassLoaders;
   import org.apache.commons.logging.Log;
  
  
  
  1.2       +0 -2      jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java
  
  Index: DiscoverMappedNames.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DiscoverMappedNames.java	8 Oct 2002 21:58:41 -0000	1.1
  +++ DiscoverMappedNames.java	8 Jan 2003 01:52:17 -0000	1.2
  @@ -57,9 +57,7 @@
   
   package org.apache.commons.discovery.resource.names;
   
  -import java.util.Enumeration;
   import java.util.Hashtable;
  -import java.util.Vector;
   
   import org.apache.commons.discovery.ResourceNameDiscover;
   import org.apache.commons.discovery.ResourceNameIterator;
  
  
  
  1.3       +1 -1      jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java
  
  Index: DiscoverNamesInDictionary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DiscoverNamesInDictionary.java	30 Aug 2002 22:19:33 -0000	1.2
  +++ DiscoverNamesInDictionary.java	8 Jan 2003 01:52:17 -0000	1.3
  @@ -106,7 +106,7 @@
        * Specify set of class loaders to be used in searching.
        */
       public void setDictionary(Dictionary table) {
  -        this.dictionary = dictionary;
  +        this.dictionary = table;
       }
       
       public void addResource(String resourceName, String resource) {
  
  
  
  1.6       +0 -1      jakarta-commons/discovery/src/java/org/apache/commons/discovery/ResourceClass.java
  
  Index: ResourceClass.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/ResourceClass.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ResourceClass.java	13 Dec 2002 16:43:37 -0000	1.5
  +++ ResourceClass.java	8 Jan 2003 01:52:17 -0000	1.6
  @@ -89,7 +89,6 @@
   
       public ResourceClass(String resourceName, URL resource, ClassLoader loader) {
           super(resourceName, resource, loader);
  -        this.resourceClass = resourceClass;
       }
       
       /**
  
  
  
  1.3       +0 -1      jakarta-commons/discovery/src/java/org/apache/commons/discovery/tools/SPInterface.java
  
  Index: SPInterface.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/tools/SPInterface.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SPInterface.java	8 Oct 2002 21:58:14 -0000	1.2
  +++ SPInterface.java	8 Jan 2003 01:52:18 -0000	1.3
  @@ -61,7 +61,6 @@
   
   package org.apache.commons.discovery.tools;
   
  -import java.lang.reflect.Constructor;
   import java.lang.reflect.InvocationTargetException;
   
   import org.apache.commons.discovery.DiscoveryException;
  
  
  
  1.3       +8 -7      jakarta-commons/discovery/src/java/org/apache/commons/discovery/tools/DiscoverSingleton.java
  
  Index: DiscoverSingleton.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/tools/DiscoverSingleton.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DiscoverSingleton.java	30 Aug 2002 00:15:19 -0000	1.2
  +++ DiscoverSingleton.java	8 Jan 2003 01:52:18 -0000	1.3
  @@ -444,7 +444,7 @@
        * garbage collection.
        */
       public static synchronized void release() {
  -        root_cache.release();
  +        EnvironmentCache.release();
       }
   
       /**
  @@ -454,7 +454,7 @@
        * <code>release()</code>.
        */
       public static synchronized void release(Class spiClass) {
  -        HashMap spis = (HashMap)root_cache.get(JDKHooks.getJDKHooks().getThreadContextClassLoader());
  +        HashMap spis = (HashMap)EnvironmentCache.get(JDKHooks.getJDKHooks().getThreadContextClassLoader());
           
           if (spis != null) {
               spis.remove(spiClass.getName());
  @@ -493,7 +493,8 @@
        * Implements first two levels of the cache (loader & groupContext).
        * Allows null keys, important as default groupContext is null.
        */
  -    private static final EnvironmentCache root_cache = new EnvironmentCache();
  +    // FIXME: Why is this here? All the methods used are static.
  +    //private static final EnvironmentCache root_cache = new EnvironmentCache();
   
       /**
        * Get service keyed by spi & classLoader.
  @@ -501,7 +502,7 @@
       private static synchronized Object get(ClassLoader classLoader,
                                              String spiName)
       {
  -        HashMap spis = (HashMap)root_cache.get(classLoader);
  +        HashMap spis = (HashMap)EnvironmentCache.get(classLoader);
           
           return (spis != null)
                  ? spis.get(spiName)
  @@ -517,11 +518,11 @@
       {
           if (service != null)
           {
  -            HashMap spis = (HashMap)root_cache.get(classLoader);
  +            HashMap spis = (HashMap)EnvironmentCache.get(classLoader);
               
               if (spis == null) {
  -                spis = new HashMap(root_cache.smallHashSize);
  -                root_cache.put(classLoader, spis);
  +                spis = new HashMap(EnvironmentCache.smallHashSize);
  +                EnvironmentCache.put(classLoader, spis);
               }
               
               spis.put(spiName, service);
  
  
  
  1.6       +1 -1      jakarta-commons/discovery/src/java/org/apache/commons/discovery/ant/ServiceDiscoveryTask.java
  
  Index: ServiceDiscoveryTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/ant/ServiceDiscoveryTask.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceDiscoveryTask.java	30 Aug 2002 22:19:33 -0000	1.5
  +++ ServiceDiscoveryTask.java	8 Jan 2003 01:52:18 -0000	1.6
  @@ -83,7 +83,7 @@
       }
   
       public void setDebug(int i) {
  -        this.debug=debug;
  +        this.debug=i;
       }
   
       public String[] getServiceInfo() {
  
  
  

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


Mime
View raw message