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-excalibur/loader/src/java/org/apache/excalibur/loader/verifier ClassLoaderVerifier.java
Date Sun, 15 Sep 2002 10:52:35 GMT
donaldp     2002/09/15 03:52:35

  Modified:    loader/src/java/org/apache/excalibur/loader/builder
                        ClassLoaderSetBuilder.java
               loader/src/java/org/apache/excalibur/loader/metadata
                        ClassLoaderDef.java
               loader/src/java/org/apache/excalibur/loader/verifier
                        ClassLoaderVerifier.java
  Removed:     loader/src/java/org/apache/excalibur/loader/metadata
                        EntryDef.java
  Log:
  Zap the entry class and merge back into ClassLoaderDef directly
  
  Revision  Changes    Path
  1.4       +6 -13     jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder/ClassLoaderSetBuilder.java
  
  Index: ClassLoaderSetBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder/ClassLoaderSetBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassLoaderSetBuilder.java	13 Sep 2002 11:38:41 -0000	1.3
  +++ ClassLoaderSetBuilder.java	15 Sep 2002 10:52:34 -0000	1.4
  @@ -13,7 +13,6 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.excalibur.loader.metadata.ClassLoaderDef;
   import org.apache.excalibur.loader.metadata.ClassLoaderSetDef;
  -import org.apache.excalibur.loader.metadata.EntryDef;
   import org.apache.excalibur.loader.metadata.FileSetDef;
   import org.apache.excalibur.loader.metadata.JoinDef;
   
  @@ -97,7 +96,7 @@
           final String name = config.getAttribute( "name" );
           final String parent = config.getAttribute( "parent" );
   
  -        final EntryDef[] entrys =
  +        final String[] entrys =
               buildEntrys( config.getChildren( "entry" ) );
           final Extension[] extensions =
               buildExtensions( config.getChildren( "extension" ) );
  @@ -186,25 +185,19 @@
           return (String[])selectors.toArray( new String[ selectors.size() ] );
       }
   
  -    private EntryDef[] buildEntrys( final Configuration[] configs )
  +    private String[] buildEntrys( final Configuration[] configs )
           throws ConfigurationException
       {
           final ArrayList entrys = new ArrayList();
   
           for( int i = 0; i < configs.length; i++ )
           {
  -            final EntryDef entry = buildEntry( configs[ i ] );
  +            final Configuration config = configs[ i ];
  +            final String entry = config.getAttribute( "location" );
               entrys.add( entry );
           }
   
  -        return (EntryDef[])entrys.toArray( new EntryDef[ entrys.size() ] );
  -    }
  -
  -    private EntryDef buildEntry( final Configuration config )
  -        throws ConfigurationException
  -    {
  -        final String location = config.getAttribute( "location" );
  -        return new EntryDef( location );
  +        return (String[])entrys.toArray( new String[ entrys.size() ] );
       }
   
       private JoinDef[] buildJoins( final Configuration[] configs )
  
  
  
  1.4       +6 -6      jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/metadata/ClassLoaderDef.java
  
  Index: ClassLoaderDef.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/metadata/ClassLoaderDef.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassLoaderDef.java	1 Sep 2002 08:27:07 -0000	1.3
  +++ ClassLoaderDef.java	15 Sep 2002 10:52:35 -0000	1.4
  @@ -11,7 +11,7 @@
   
   /**
    * This class defines a specific classloader, made up of
  - * {@link EntryDef}, {@link Extension} and
  + * entrys, {@link Extension} and
    * {@link FileSetDef} objects.
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
  @@ -34,7 +34,7 @@
       /**
        * The Entrys that are added to this ClassLoader.
        */
  -    private final EntryDef[] m_entrys;
  +    private final String[] m_entrys;
   
       /**
        * The Entrys that are required by this ClassLoader.
  @@ -48,13 +48,13 @@
   
       public ClassLoaderDef( final String name,
                                   final String parent,
  -                                final EntryDef[] elements,
  +                                final String[] entrys,
                                   final Extension[] extensions,
                                   final FileSetDef[] filesets )
       {
           m_name = name;
           m_parent = parent;
  -        m_entrys = elements;
  +        m_entrys = entrys;
           m_extensions = extensions;
           m_filesets = filesets;
       }
  @@ -84,7 +84,7 @@
        *
        * @return the elements added to Classloader.
        */
  -    public EntryDef[] getEntrys()
  +    public String[] getEntrys()
       {
           return m_entrys;
       }
  
  
  
  1.3       +4 -7      jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/verifier/ClassLoaderVerifier.java
  
  Index: ClassLoaderVerifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/verifier/ClassLoaderVerifier.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassLoaderVerifier.java	7 Sep 2002 05:48:01 -0000	1.2
  +++ ClassLoaderVerifier.java	15 Sep 2002 10:52:35 -0000	1.3
  @@ -12,7 +12,6 @@
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.excalibur.loader.metadata.ClassLoaderDef;
   import org.apache.excalibur.loader.metadata.ClassLoaderSetDef;
  -import org.apache.excalibur.loader.metadata.EntryDef;
   import org.apache.excalibur.loader.metadata.JoinDef;
   
   /**
  @@ -246,15 +245,13 @@
       private void verifyUniqueClassLoaderEntrys( final ClassLoaderDef classLoader )
           throws Exception
       {
  -        final EntryDef[] entrys = classLoader.getEntrys();
  +        final String[] entrys = classLoader.getEntrys();
           for( int i = 0; i < entrys.length; i++ )
           {
  -            final EntryDef entry = entrys[ i ];
  -            final String location = entry.getLocation();
  +            final String location = entrys[ i ];
               for( int j = i + 1; j < entrys.length; j++ )
               {
  -                final EntryDef other = entrys[ j ];
  -                if( location.equals( other.getLocation() ) )
  +                if( location.equals( entrys[ j ] ) )
                   {
                       final String message =
                           REZ.getString( "classloader-dup-entrys.error",
  
  
  

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