Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/UncheckedPrintWriter.java @ 820:8e9db0bbf4f9
remove org.eclipse.jetty.util.log and upgrade slf4j
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 13 Sep 2016 23:13:06 -0600 |
| parents | 3428c60d7cfc |
| children |
comparison
equal
deleted
inserted
replaced
| 819:17bd0b170ed6 | 820:8e9db0bbf4f9 |
|---|---|
| 24 import java.io.OutputStream; | 24 import java.io.OutputStream; |
| 25 import java.io.OutputStreamWriter; | 25 import java.io.OutputStreamWriter; |
| 26 import java.io.PrintWriter; | 26 import java.io.PrintWriter; |
| 27 import java.io.Writer; | 27 import java.io.Writer; |
| 28 | 28 |
| 29 import org.eclipse.jetty.util.log.Log; | 29 import org.slf4j.Logger; |
| 30 import org.eclipse.jetty.util.log.Logger; | 30 import org.slf4j.LoggerFactory; |
| 31 | 31 |
| 32 /* ------------------------------------------------------------ */ | 32 /* ------------------------------------------------------------ */ |
| 33 /** | 33 /** |
| 34 * A wrapper for the {@link java.io.PrintWriter} that re-throws the instances of | 34 * A wrapper for the {@link java.io.PrintWriter} that re-throws the instances of |
| 35 * {@link java.io.IOException} thrown by the underlying implementation of | 35 * {@link java.io.IOException} thrown by the underlying implementation of |
| 36 * {@link java.io.Writer} as {@link RuntimeIOException} instances. | 36 * {@link java.io.Writer} as {@link RuntimeIOException} instances. |
| 37 */ | 37 */ |
| 38 public class UncheckedPrintWriter extends PrintWriter | 38 public class UncheckedPrintWriter extends PrintWriter |
| 39 { | 39 { |
| 40 private static final Logger LOG = Log.getLogger(UncheckedPrintWriter.class); | 40 private static final Logger LOG = LoggerFactory.getLogger(UncheckedPrintWriter.class); |
| 41 | 41 |
| 42 private boolean _autoFlush = false; | 42 private boolean _autoFlush = false; |
| 43 private IOException _ioException; | 43 private IOException _ioException; |
| 44 private boolean _isClosed = false; | 44 private boolean _isClosed = false; |
| 45 | 45 |
| 127 { | 127 { |
| 128 _ioException=new IOException(String.valueOf(th)); | 128 _ioException=new IOException(String.valueOf(th)); |
| 129 _ioException.initCause(th); | 129 _ioException.initCause(th); |
| 130 } | 130 } |
| 131 | 131 |
| 132 LOG.debug(th); | 132 LOG.debug("",th); |
| 133 } | 133 } |
| 134 | 134 |
| 135 | 135 |
| 136 @Override | 136 @Override |
| 137 protected void setError() | 137 protected void setError() |
