avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger DefaultLogTargetFactoryManager.java
Date Mon, 02 Jun 2003 13:53:33 GMT
bloritsch    2003/06/02 06:53:33

  Modified:    logger/src/java/org/apache/avalon/excalibur/logger
                        DefaultLogTargetFactoryManager.java
  Log:
  simplify the context stuff
  
  Revision  Changes    Path
  1.12      +5 -22     avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLogTargetFactoryManager.java
  
  Index: DefaultLogTargetFactoryManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLogTargetFactoryManager.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DefaultLogTargetFactoryManager.java	27 May 2003 07:30:27 -0000	1.11
  +++ DefaultLogTargetFactoryManager.java	2 Jun 2003 13:53:33 -0000	1.12
  @@ -106,10 +106,8 @@
        * Reads a context object.
        *
        * @param context The context object.
  -     * @throws ContextException if the context is malformed
        */
       public final void contextualize( final Context context )
  -        throws ContextException
       {
           m_context = context;
           try
  @@ -118,6 +116,7 @@
           }
           catch( ContextException ce )
           {
  +            m_classLoader = Thread.currentThread().getContextClassLoader();
           }
       }
   
  @@ -142,28 +141,12 @@
                   Class clazz = null;
   
                   //First lets try the supplied ClassLoader
  -                if( null != m_classLoader )
  +                try
                   {
  -                    try
  -                    {
  -                        clazz = m_classLoader.loadClass( factoryClass );
  -                    }
  -                    catch( final ClassNotFoundException cnfe )
  -                    {
  -                    }
  +                    clazz = m_classLoader.loadClass( factoryClass );
                   }
  -
  -                //Next lets try the context ClassLoader
  -                final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
  -                if( null == clazz && null != classLoader )
  +                catch( final ClassNotFoundException cnfe )
                   {
  -                    try
  -                    {
  -                        clazz = classLoader.loadClass( factoryClass );
  -                    }
  -                    catch( final ClassNotFoundException cnfe )
  -                    {
  -                    }
                   }
   
                   //Okay now lets try classLoader this class was loaded from
  
  
  

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


Mime
View raw message