diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java index c78ceb2d5c..20209c0a98 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java @@ -119,7 +119,7 @@ public class JSONUtils { */ public static List toList(String json, Class clazz) { if (StringUtils.isEmpty(json)) { - return new ArrayList<>(); + return Collections.emptyList(); } try { @@ -130,7 +130,7 @@ public class JSONUtils { logger.error("parse list exception!", e); } - return new ArrayList<>(); + return Collections.emptyList(); }