avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/classloader PolicyClassLoader.java DefaultClassLoaderManager.java
Date Thu, 31 Oct 2002 21:51:49 GMT
donaldp     2002/10/31 13:51:49

  Modified:    src/java/org/apache/avalon/phoenix/components/classloader
                        PolicyClassLoader.java
                        DefaultClassLoaderManager.java
  Log:
  Pass in URL array rather than string array for codebase.
  
  Revision  Changes    Path
  1.21      +2 -8      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/classloader/PolicyClassLoader.java
  
  Index: PolicyClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/classloader/PolicyClassLoader.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- PolicyClassLoader.java	6 Sep 2002 12:01:07 -0000	1.20
  +++ PolicyClassLoader.java	31 Oct 2002 21:51:49 -0000	1.21
  @@ -44,24 +44,18 @@
        * @param parent the parent ClassLoader
        * @param policy the Policy object
        */
  -    PolicyClassLoader( final String[] urls,
  +    PolicyClassLoader( final URL[] urls,
                          final ClassLoader parent,
                          final Policy policy )
           throws MalformedURLException
       {
  -        super( new URL[ 0 ], parent );
  +        super( urls, parent );
   
           if( null == policy )
           {
               throw new NullPointerException( "policy" );
           }
           m_policy = policy;
  -
  -        for( int i = 0; i < urls.length; i++ )
  -        {
  -            final URL url = new URL( urls[ i ] );
  -            addURL( url );
  -        }
       }
   
       public void enableLogging( final Logger logger )
  
  
  
  1.46      +7 -1      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/classloader/DefaultClassLoaderManager.java
  
  Index: DefaultClassLoaderManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/classloader/DefaultClassLoaderManager.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- DefaultClassLoaderManager.java	28 Oct 2002 00:39:07 -0000	1.45
  +++ DefaultClassLoaderManager.java	31 Oct 2002 21:51:49 -0000	1.46
  @@ -139,8 +139,14 @@
               getLogger().debug( message );
           }
   
  +        final URL[] urls = new URL[ classPath.length ];
  +        for( int i = 0; i < urls.length; i++ )
  +        {
  +            urls[ i ] = new URL( classPath[ i ] );
  +        }
  +
           final PolicyClassLoader classLoader =
  -            new PolicyClassLoader( classPath, m_commonClassLoader, policy );
  +            new PolicyClassLoader( urls, m_commonClassLoader, policy );
           setupLogger( classLoader, "classloader" );
   
           for( int i = 0; i < extensions.length; i++ )
  
  
  

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


Mime
View raw message