Skip to content

Commit

Permalink
Analysis: Resolve open has no effect in an object warnings
Browse files Browse the repository at this point in the history
Warning Message: "'open' has no effect in an object"
  • Loading branch information
ParaskP7 committed Nov 17, 2022
1 parent c32e320 commit 6c5296d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class InstanceStateUtils {
externalLogger?.logException(e, "Error trying to write cache for $varName.")
}

open fun writeTempInstance(context: Context, externalLogger: AztecLog.ExternalLogger?, varName: String, obj: Any?, bundle: Bundle) {
fun writeTempInstance(context: Context, externalLogger: AztecLog.ExternalLogger?, varName: String, obj: Any?, bundle: Bundle) {
try {
with(File.createTempFile(varName, ".inst", context.getCacheDir())) {
deleteOnExit() // just make sure if we miss deleting this cache file the VM will eventually do it
Expand All @@ -46,7 +46,7 @@ class InstanceStateUtils {
}
}

open fun <T> readAndPurgeTempInstance(varName: String, defaultValue: T, bundle: Bundle): T {
fun <T> readAndPurgeTempInstance(varName: String, defaultValue: T, bundle: Bundle): T {
// the full path is kept in the bundle so, get it from there
val filename = bundle.getString(cacheFilenameKey(varName))

Expand Down Expand Up @@ -77,4 +77,4 @@ class InstanceStateUtils {
return obj
}
}
}
}

0 comments on commit 6c5296d

Please sign in to comment.