Address some OkHttp nullability changes

This commit is contained in:
arkon
2022-09-03 10:38:56 -04:00
parent bbf5c86b46
commit 38950f7bc8
9 changed files with 15 additions and 19 deletions
@@ -164,12 +164,12 @@ class ChapterCache(private val context: Context) {
editor = diskCache.edit(key) ?: throw IOException("Unable to edit key")
// Get OutputStream and write image with Okio.
response.body!!.source().saveTo(editor.newOutputStream(0))
response.body.source().saveTo(editor.newOutputStream(0))
diskCache.flush()
editor.commit()
} finally {
response.body?.close()
response.body.close()
editor?.abortUnlessCommitted()
}
}