donaldp     02/04/25 21:01:22

  Modified:    threadcontext/src/java/org/apache/excalibur/threadcontext
                        ThreadContext.java
  Log:
  Remove the message part in NullPointerExceptions and just pass in variable 
name.
  
  Revision  Changes    Path
  1.4       +7 -7      
jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContext.java
  
  Index: ThreadContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ThreadContext.java        10 Apr 2002 10:51:26 -0000      1.3
  +++ ThreadContext.java        26 Apr 2002 04:01:22 -0000      1.4
  @@ -58,7 +58,7 @@
   
       /**
        * This variable is set to the thread that the ThreadContext
  -     * is currently active on. A ThreadContext can not be active 
  +     * is currently active on. A ThreadContext can not be active
        * on multiple threads at the same time.
        */
       private Thread m_activeThread;
  @@ -94,13 +94,13 @@
   
           if( threadContext.isActive() )
           {
  -            throw new IllegalArgumentException( "Specified ThreadContext is 
already " + 
  +            throw new IllegalArgumentException( "Specified ThreadContext is 
already " +
                                                   "bound to a thread" );
           }
   
           final ThreadContext oldThreadContext = 
(ThreadContext)c_context.get();
  -        if( null != oldThreadContext ) 
  -        { 
  +        if( null != oldThreadContext )
  +        {
               oldThreadContext.deactivate();
           }
   
  @@ -121,12 +121,12 @@
       {
           if( null == policy )
           {
  -            throw new NullPointerException( "policy property is null" );
  +            throw new NullPointerException( "policy" );
           }
   
           if( null == map )
           {
  -            throw new NullPointerException( "map property is null" );
  +            throw new NullPointerException( "map" );
           }
   
           m_policy = policy;
  @@ -173,7 +173,7 @@
       /**
        * Inner class to offer accessor interface to policy object.
        */
  -    private class InnerThreadContextAccessor 
  +    private class InnerThreadContextAccessor
           implements ThreadContextAccessor
       {
           public boolean containsKey( final String key )
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to