Always buffer sink.

This commit is contained in:
Jake Wharton
2014-08-11 10:51:51 -07:00
parent ba5479cf11
commit 64155a46b2

View File

@@ -187,11 +187,7 @@ public class JsonWriter implements Closeable, Flushable {
if (sink == null) {
throw new NullPointerException("sink == null");
}
if (sink instanceof BufferedSink) {
this.sink = (BufferedSink) sink;
} else {
this.sink = Okio.buffer(sink);
}
this.sink = Okio.buffer(sink);
}
/**