diff --git a/data/src/main/java/one/nem/lacerta/data/impl/CommonsImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/CommonsImpl.java index 26a6c71b..35653755 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/CommonsImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/CommonsImpl.java @@ -3,6 +3,7 @@ package one.nem.lacerta.data.impl; import android.content.Context; import java.nio.file.Path; +import java.util.Objects; import javax.inject.Inject; @@ -20,11 +21,11 @@ public class CommonsImpl implements Commons{ public Path getExternalFilesDirPath(String type) { - return applicationContext.getExternalFilesDir(type).toPath(); + return Objects.requireNonNull(applicationContext.getExternalFilesDir(type)).toPath(); } public Path getExternalFilesDirPath() { - return applicationContext.getExternalFilesDir(null).toPath(); + return Objects.requireNonNull(applicationContext.getExternalFilesDir(null)).toPath(); } }