From b3dd617edc67175e69caa3e3b20d9ea787c94fea Mon Sep 17 00:00:00 2001 From: SerLiunx-ctrl <17689543@qq.com> Date: Thu, 13 Jun 2024 11:52:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Yaml=E5=AE=9E=E4=BE=8B=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=97=B6=E5=9F=BA=E6=9C=AC=E7=B1=BB=E5=9E=8B=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serliunx/ddns/core/factory/YamlFileInstanceFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/serliunx/ddns/core/factory/YamlFileInstanceFactory.java b/src/main/java/com/serliunx/ddns/core/factory/YamlFileInstanceFactory.java index e1aad14..e7b994e 100644 --- a/src/main/java/com/serliunx/ddns/core/factory/YamlFileInstanceFactory.java +++ b/src/main/java/com/serliunx/ddns/core/factory/YamlFileInstanceFactory.java @@ -93,7 +93,8 @@ public class YamlFileInstanceFactory extends FileInstanceFactory { f.set(instance, Enum.valueOf((Class) clazz, (String) value)); continue; } - f.set(instance, value); + if (value != null) + f.set(instance, value); } catch (IllegalAccessException e) { throw new RuntimeException(e); }