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 c78ceb2d5c8e060d34a03b7af030084e145f4a1c..20209c0a98969d46a6f313e9d1348234e01b8ed8 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(); }