logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: jakarta-log4j/src/java/org/apache/log4j Category.java
Date Thu, 10 Jul 2003 08:50:32 GMT
ceki        2003/07/10 01:50:31

  Modified:    src/java/org/apache/log4j Category.java
  Log:
  
  In certain cases the ReadWriteLock would not be released.
  
  Revision  Changes    Path
  1.76      +8 -6      jakarta-log4j/src/java/org/apache/log4j/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Category.java,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- Category.java	21 Jun 2003 07:33:59 -0000	1.75
  +++ Category.java	10 Jul 2003 08:50:31 -0000	1.76
  @@ -203,8 +203,8 @@
   
       aai.addAppender(newAppender);
       lock.releaseWriteLock();
  -
       //	END - WRITE LOCK
  +
       repository.fireAddAppenderEvent((Logger) this, newAppender);
     }
   
  @@ -499,15 +499,17 @@
      * </p>
      */
     public Appender getAppender(String name) {
  +  	Appender result;
  +  	
     	lock.getReadLock();
       if ((aai == null) || (name == null)) {
  -      return null;
  -    }
  -	
  -	  Appender appender = aai.getAppender(name);
  +      result = null;
  +    } else {	
  +	    result = aai.getAppender(name);
  +    }	  
   	  lock.releaseReadLock();
   	
  -    return appender;
  +    return result;
     }
   
     /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message