diff --git a/okhttp/src/main/java/okhttp3/internal/cache/DiskLruCache.java b/okhttp/src/main/java/okhttp3/internal/cache/DiskLruCache.java
index 8b7b7f2a0..4d3ef616a 100644
--- a/okhttp/src/main/java/okhttp3/internal/cache/DiskLruCache.java
+++ b/okhttp/src/main/java/okhttp3/internal/cache/DiskLruCache.java
@@ -35,13 +35,11 @@ import java.util.regex.Pattern;
import okhttp3.internal.Util;
import okhttp3.internal.io.FileSystem;
import okhttp3.internal.platform.Platform;
-import okio.Buffer;
import okio.BufferedSink;
import okio.BufferedSource;
import okio.Okio;
import okio.Sink;
import okio.Source;
-import okio.Timeout;
import static okhttp3.internal.platform.Platform.WARN;
@@ -187,7 +185,7 @@ public final class DiskLruCache implements Closeable, Flushable {
}
} catch (IOException e) {
mostRecentRebuildFailed = true;
- journalWriter = Okio.buffer(NULL_SINK);
+ journalWriter = Okio.buffer(Okio.blackhole());
}
}
}
@@ -822,22 +820,6 @@ public final class DiskLruCache implements Closeable, Flushable {
}
}
- private static final Sink NULL_SINK = new Sink() {
- @Override public void write(Buffer source, long byteCount) throws IOException {
- source.skip(byteCount);
- }
-
- @Override public void flush() throws IOException {
- }
-
- @Override public Timeout timeout() {
- return Timeout.NONE;
- }
-
- @Override public void close() throws IOException {
- }
- };
-
/** Edits the values for an entry. */
public final class Editor {
private final Entry entry;
@@ -899,7 +881,7 @@ public final class DiskLruCache implements Closeable, Flushable {
throw new IllegalStateException();
}
if (entry.currentEditor != this) {
- return NULL_SINK;
+ return Okio.blackhole();
}
if (!entry.readable) {
written[index] = true;
@@ -909,7 +891,7 @@ public final class DiskLruCache implements Closeable, Flushable {
try {
sink = fileSystem.sink(dirtyFile);
} catch (FileNotFoundException e) {
- return NULL_SINK;
+ return Okio.blackhole();
}
return new FaultHidingSink(sink) {
@Override protected void onException(IOException e) {
diff --git a/pom.xml b/pom.xml
index d769d52c2..1b548b8b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
16.0
1.7
1.1.0
- 1.9.0
+ 1.10.0
4.12