From 8f7a420ae363933f692cb4a6e588e6a4a6cba3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 12 Dec 2023 10:22:28 +0900 Subject: [PATCH] =?UTF-8?q?RequireNonNull=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/one/nem/lacerta/data/impl/CommonsImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); } }