Author: carnold
Date: Tue Aug  1 12:15:20 2006
New Revision: 427681

URL: http://svn.apache.org/viewvc?rev=427681&view=rev
Log:
Bug 31003: RollingFileAppender, if removed, can cause null pointer exceptions

Modified:
    
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/RollingFileAppender.java

Modified: 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/RollingFileAppender.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/RollingFileAppender.java?rev=427681&r1=427680&r2=427681&view=diff
==============================================================================
--- 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/RollingFileAppender.java
 (original)
+++ 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/RollingFileAppender.java
 Tue Aug  1 12:15:20 2006
@@ -118,7 +118,9 @@
     File target;
     File file;
 
-    LogLog.debug("rolling over count=" + ((CountingQuietWriter) 
qw).getCount());
+    if (qw != null) {
+       LogLog.debug("rolling over count=" + ((CountingQuietWriter) 
qw).getCount());
+    }
     LogLog.debug("maxBackupIndex="+maxBackupIndex);
 
     // If maxBackups <= 0, then there is no file renaming to be done.



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

Reply via email to