Merge pull request #7 from square/jw/okio-writer

Always buffer sink.
This commit is contained in:
Jesse Wilson
2014-08-11 15:05:25 -04:00

View File

@@ -187,12 +187,8 @@ 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);
}
}
/**
* Sets the indentation string to be repeated for each level of indentation