Skip to content

Commit afceafd

Browse files
generatedunixname89002005287564meta-codesync[bot]
authored andcommitted
fbsource//fbandroid/libraries/fresco/imagepipeline-base/src/main/java/com/facebook/cache/disk:disk
Reviewed By: oprisnik Differential Revision: D90004797 fbshipit-source-id: ac584421494e2d4d933feba684e240612df5ce9e
1 parent 9bf9ffd commit afceafd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imagepipeline-base/src/main/java/com/facebook/cache/disk/DefaultDiskStorage.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class DefaultDiskStorage(rootDirectory: File, version: Int, cacheErrorLogger: Ca
268268
@Throws(IOException::class)
269269
override fun insert(resourceId: String, debugInfo: Any): DiskStorage.Inserter {
270270
// ensure that the parent directory exists
271-
val info = DefaultDiskStorage.FileInfo(FileType.Companion.TEMP, resourceId!!)
271+
val info = DefaultDiskStorage.FileInfo(FileType.Companion.TEMP, resourceId)
272272
val parent = getSubdirectory(info.resourceId)
273273
if (!parent.exists()) {
274274
mkdirs(parent, "insert")
@@ -555,7 +555,7 @@ class DefaultDiskStorage(rootDirectory: File, version: Int, cacheErrorLogger: Ca
555555
var length: Long
556556
try {
557557
val countingStream = CountingOutputStream(fileStream)
558-
callback!!.write(countingStream)
558+
callback.write(countingStream)
559559
// just in case underlying stream's close method doesn't flush:
560560
// we flush it manually and inside the try/catch
561561
countingStream.flush()

0 commit comments

Comments
 (0)