Author: carnold
Date: Fri Oct  9 04:45:42 2009
New Revision: 823408

URL: http://svn.apache.org/viewvc?rev=823408&view=rev
Log:
Bug 46574: The QuietWriter class does not live up to its published contract

Modified:
    logging/log4j/trunk/src/changes/changes.xml
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/QuietWriter.java

Modified: logging/log4j/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/changes/changes.xml?rev=823408&r1=823407&r2=823408&view=diff
==============================================================================
--- logging/log4j/trunk/src/changes/changes.xml (original)
+++ logging/log4j/trunk/src/changes/changes.xml Fri Oct  9 04:45:42 2009
@@ -83,6 +83,7 @@
        <action action="fix" issue="47465">Reading configuration files from a 
JAR locks the JAR file</action>
        <action action="add" issue="38061">PropertyConfigurator does not 
support configuring ErrorHandler.</action>
        <action action="fix" issue="47967">log4j.ignoreTCL should apply to the 
getResource method in addition to the loadClass method of 
org.apache.log4j.helpers.Loader.</action>
+       <action action="fix" issue="46574">The QuietWriter class does not live 
up to its published contract.</action>
     </release>
 
   

Modified: 
logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/QuietWriter.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/QuietWriter.java?rev=823408&r1=823407&r2=823408&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/QuietWriter.java 
(original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/QuietWriter.java 
Fri Oct  9 04:45:42 2009
@@ -19,7 +19,6 @@
 
 import java.io.Writer;
 import java.io.FilterWriter;
-import java.io.IOException;
 import org.apache.log4j.spi.ErrorHandler;
 import org.apache.log4j.spi.ErrorCode;
 
@@ -47,7 +46,7 @@
     if (string != null) {
        try {
                out.write(string);
-       } catch(IOException e) {
+       } catch(Exception e) {
                errorHandler.error("Failed to write ["+string+"].", e, 
                                ErrorCode.WRITE_FAILURE);
            }
@@ -58,7 +57,7 @@
   void flush() {
     try {
       out.flush();
-    } catch(IOException e) {
+    } catch(Exception e) {
       errorHandler.error("Failed to flush writer,", e, 
                         ErrorCode.FLUSH_FAILURE);
     }  



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to