From b39e091cfce728b6cc7efd6f59e6f5235ebccfc9 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 6 Sep 2016 10:52:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BD=93=E5=80=BC=E4=B8=BAnull=E6=97=B6?= =?UTF-8?q?=E6=94=BE=E5=BC=83=E5=90=8E=E7=BB=AD=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../java/pw/yumc/YumCore/config/AbstractInjectConfig.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/pw/yumc/YumCore/config/AbstractInjectConfig.java b/src/main/java/pw/yumc/YumCore/config/AbstractInjectConfig.java index b979e8f..878c59c 100644 --- a/src/main/java/pw/yumc/YumCore/config/AbstractInjectConfig.java +++ b/src/main/java/pw/yumc/YumCore/config/AbstractInjectConfig.java @@ -60,8 +60,10 @@ public abstract class AbstractInjectConfig { if (value == null) { if (def != null) { value = def.value(); - } else if (field.getAnnotation(Nullable.class) == null) { - Log.warning(String.format(PATH_NOT_FOUND, path)); + } else { + if (field.getAnnotation(Nullable.class) == null) { + Log.warning(String.format(PATH_NOT_FOUND, path)); + } return; } }