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/threadcontext/src/test/org/apache/excalibur/threadcontext/test ThreadContextTestCase.java
Date Fri, 26 Apr 2002 06:34:49 GMT
donaldp     02/04/25 23:34:49

  Modified:    threadcontext/src/java/org/apache/excalibur/threadcontext
                        ThreadContextPolicy.java
               threadcontext/src/java/org/apache/excalibur/threadcontext/impl
                        DefaultThreadContextPolicy.java
               threadcontext/src/test/org/apache/excalibur/threadcontext/test
                        ThreadContextTestCase.java
  Log:
  Move CLASSLOADER constant to implementation that actually uses it.
  
  Revision  Changes    Path
  1.4       +1 -6      jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContextPolicy.java
  
  Index: ThreadContextPolicy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContextPolicy.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ThreadContextPolicy.java	26 Apr 2002 05:38:49 -0000	1.3
  +++ ThreadContextPolicy.java	26 Apr 2002 06:34:49 -0000	1.4
  @@ -23,15 +23,10 @@
    * <p>This interface is expected to be used as a Flyweight object.</p>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $ $Date: 2002/04/26 05:38:49 $
  + * @version $Revision: 1.4 $ $Date: 2002/04/26 06:34:49 $
    */
   public interface ThreadContextPolicy
   {
  -    /**
  -     * Key used to store <code>ContextClassLoader</code> in ThreadContextAccessor.
  -     */
  -    String CLASSLOADER = ClassLoader.class.getName();
  -
       /**
        * The activate method is called when the ThreadContext
        * is associated with a thread.
  
  
  
  1.5       +5 -1      jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/impl/DefaultThreadContextPolicy.java
  
  Index: DefaultThreadContextPolicy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/impl/DefaultThreadContextPolicy.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultThreadContextPolicy.java	26 Apr 2002 06:33:28 -0000	1.4
  +++ DefaultThreadContextPolicy.java	26 Apr 2002 06:34:49 -0000	1.5
  @@ -16,11 +16,15 @@
    * class to extend for those wanting to write their own Policy.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.4 $ $Date: 2002/04/26 06:33:28 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/26 06:34:49 $
    */
   public class DefaultThreadContextPolicy
       extends AbstractThreadContextPolicy
   {
  +    /**
  +     * Key used to store <code>ContextClassLoader</code> in ThreadContextAccessor.
  +     */
  +    public final static String CLASSLOADER = ClassLoader.class.getName();
   
       public DefaultThreadContextPolicy()
       {
  
  
  
  1.2       +5 -6      jakarta-avalon-excalibur/threadcontext/src/test/org/apache/excalibur/threadcontext/test/ThreadContextTestCase.java
  
  Index: ThreadContextTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/threadcontext/src/test/org/apache/excalibur/threadcontext/test/ThreadContextTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ThreadContextTestCase.java	26 Apr 2002 05:38:49 -0000	1.1
  +++ ThreadContextTestCase.java	26 Apr 2002 06:34:49 -0000	1.2
  @@ -7,12 +7,11 @@
    */
   package org.apache.excalibur.threadcontext.test;
   
  -import java.util.HashMap;
  -import java.net.URLClassLoader;
   import java.net.URL;
  +import java.net.URLClassLoader;
  +import java.util.HashMap;
   import junit.framework.TestCase;
   import org.apache.excalibur.threadcontext.ThreadContext;
  -import org.apache.excalibur.threadcontext.ThreadContextPolicy;
   import org.apache.excalibur.threadcontext.impl.DefaultThreadContextPolicy;
   
   /**
  @@ -20,7 +19,7 @@
    * behaves as expected.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/26 05:38:49 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/26 06:34:49 $
    */
   public class ThreadContextTestCase
       extends TestCase
  @@ -38,7 +37,7 @@
   
           final HashMap map = new HashMap();
           final ClassLoader expected = null;
  -        map.put( ThreadContextPolicy.CLASSLOADER, expected );
  +        map.put( DefaultThreadContextPolicy.CLASSLOADER, expected );
           setThreadContext( map );
           final ClassLoader newValue =
               Thread.currentThread().getContextClassLoader();
  @@ -62,7 +61,7 @@
   
           final HashMap map = new HashMap();
           final ClassLoader expected = new URLClassLoader( new URL[ 0 ] );
  -        map.put( ThreadContextPolicy.CLASSLOADER, expected );
  +        map.put( DefaultThreadContextPolicy.CLASSLOADER, expected );
           setThreadContext( map );
           final ClassLoader newValue =
               Thread.currentThread().getContextClassLoader();
  
  
  

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