1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-22 01:48:50 +00:00

fix: 修复可能存在的空指针

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2017-03-07 16:59:05 +08:00
parent c9bc929cec
commit 1c85776b8a

View File

@ -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);