1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-18 20:40:58 +03:00

Empty sinks must still honor the contract by consuming the bytes.

This commit is contained in:
Jake Wharton
2015-01-12 18:25:33 -05:00
parent 78c493e337
commit f7de645ded

View File

@@ -812,7 +812,7 @@ public final class DiskLruCache implements Closeable {
private static final Sink NULL_SINK = new Sink() {
@Override public void write(Buffer source, long byteCount) throws IOException {
// Eat all writes silently. Nom nom.
source.skip(byteCount);
}
@Override public void flush() throws IOException {