summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/com/android/internal/util/FastPrintWriter.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/com/android/internal/util/FastPrintWriter.java b/core/java/com/android/internal/util/FastPrintWriter.java
index c70a243..c74fea0 100644
--- a/core/java/com/android/internal/util/FastPrintWriter.java
+++ b/core/java/com/android/internal/util/FastPrintWriter.java
@@ -15,7 +15,7 @@ import java.nio.charset.CoderResult;
import java.nio.charset.CodingErrorAction;
public class FastPrintWriter extends PrintWriter {
- private static Writer sDummyWriter = new Writer() {
+ private static class DummyWriter extends Writer {
@Override
public void close() throws IOException {
UnsupportedOperationException ex
@@ -100,7 +100,7 @@ public class FastPrintWriter extends PrintWriter {
* if {@code out} is {@code null}.
*/
public FastPrintWriter(OutputStream out, boolean autoFlush, int bufferLen) {
- super(sDummyWriter, autoFlush);
+ super(new DummyWriter(), autoFlush);
if (out == null) {
throw new NullPointerException("out is null");
}
@@ -169,7 +169,7 @@ public class FastPrintWriter extends PrintWriter {
* if {@code wr} is {@code null}.
*/
public FastPrintWriter(Writer wr, boolean autoFlush, int bufferLen) {
- super(sDummyWriter, autoFlush);
+ super(new DummyWriter(), autoFlush);
if (wr == null) {
throw new NullPointerException("wr is null");
}
@@ -212,7 +212,7 @@ public class FastPrintWriter extends PrintWriter {
* if {@code pr} is {@code null}.
*/
public FastPrintWriter(Printer pr, int bufferLen) {
- super(sDummyWriter, true);
+ super(new DummyWriter(), true);
if (pr == null) {
throw new NullPointerException("pr is null");
}