ceki        01/08/07 15:17:27

  Modified:    src/java/org/apache/log4j MDC.java
  Log:
  Doc changes
  
  Revision  Changes    Path
  1.6       +17 -4     jakarta-log4j/src/java/org/apache/log4j/MDC.java
  
  Index: MDC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/MDC.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MDC.java  2001/08/07 06:31:33     1.5
  +++ MDC.java  2001/08/07 22:17:27     1.6
  @@ -24,7 +24,9 @@
      diagnostic context of its parent which is managed independently of
      the parent's context.
   
  -   <p>The MDC requires JDK 1.2. It will not work under JDK 1.1.
  +   
  +
  +   <p>The MDC class requires JDK 1.2. It will not work under JDK 1.1.
   
      
      @since 1.2
  @@ -32,24 +34,35 @@
      @author Ceki G&uuml;lc&uuml; */
   public class MDC {
     
  -  
     final static ThreadLocalMap context = new ThreadLocalMap();
     
     static final int HT_SIZE = 7;
   
  +  /**
  +     Put a context value (the <code>o</code> parameter) as identified
  +     with the <code>key</code> parameter into the current thread's
  +     context map.
  +
  +     <p>If the current thread does not have a context map it is
  +     created as a side effect.
  +    
  +   */
     static
     public
     void put(String key, Object o) {
       Hashtable ht = (Hashtable) context.get();
       if(ht == null) {
  -      //System.out.println("Creating new ht. [" + Thread.currentThread().getName()+
  -      //              "]");
         ht = new Hashtable(HT_SIZE);
         context.set(ht);
       }    
       ht.put(key, o);
     }
     
  +  /**
  +     Get the context identified by the <code>key</code> parameter.
  +
  +     <p>This method has no side effects.
  +   */
     static 
     public
     Object get(String key) {
  
  
  

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

Reply via email to