From 1c85776b8a67030fa07574be2d8d117c2bb0ee23 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 7 Mar 2017 16:59:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- src/main/java/pw/yumc/YumCore/config/inject/InjectParse.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/pw/yumc/YumCore/config/inject/InjectParse.java b/src/main/java/pw/yumc/YumCore/config/inject/InjectParse.java index 0fe3dd6..6855b81 100644 --- a/src/main/java/pw/yumc/YumCore/config/inject/InjectParse.java +++ b/src/main/java/pw/yumc/YumCore/config/inject/InjectParse.java @@ -54,9 +54,8 @@ public class InjectParse { @Override public Date parse(ConfigurationSection config, String path) { - String value = "0000-00-00 00:00:00"; + String value = config.getString(path) == null ? "0000-00-00 00:00:00" : config.getString(path); try { - value = config.getString(path); return df.parse(value); } catch (ParseException e) { throw new ConfigParseException(String.format(DATE_PARSE_ERROR, path, DATE_FORMAT, value), e);