commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsi...@apache.org
Subject cvs commit: jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource ClassLoaders.java
Date Tue, 08 Oct 2002 23:54:55 GMT
rsitze      2002/10/08 16:54:55

  Modified:    discovery/src/java/org/apache/commons/discovery/resource
                        ClassLoaders.java
  Log:
  
  
  Revision  Changes    Path
  1.2       +4 -4      jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/ClassLoaders.java
  
  Index: ClassLoaders.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/ClassLoaders.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClassLoaders.java	30 Aug 2002 00:15:20 -0000	1.1
  +++ ClassLoaders.java	8 Oct 2002 23:54:55 -0000	1.2
  @@ -171,8 +171,8 @@
       public static ClassLoaders getLibLoaders(Class spi, Class factory, boolean prune) {
           ClassLoaders loaders = new ClassLoaders();
           
  -        loaders.put(spi.getClassLoader());
  -        loaders.put(factory.getClassLoader(), prune);
  +        if (spi != null) loaders.put(spi.getClassLoader());
  +        if (factory != null) loaders.put(factory.getClassLoader(), prune);
           loaders.put(JDKHooks.getJDKHooks().getSystemClassLoader(), prune);
           
           return loaders;
  @@ -202,8 +202,8 @@
           ClassLoaders loaders = new ClassLoaders();
   
           loaders.put(JDKHooks.getJDKHooks().getThreadContextClassLoader());
  -        loaders.put(spi.getClassLoader(), prune);
  -        loaders.put(factory.getClassLoader(), prune);
  +        if (spi != null) loaders.put(spi.getClassLoader(), prune);
  +        if (factory != null) loaders.put(factory.getClassLoader(), prune);
           loaders.put(JDKHooks.getJDKHooks().getSystemClassLoader(), prune);
           
           return loaders;
  
  
  

--
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