diff --git a/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/BatchRequest.java b/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/BatchRequest.java index ac9850498de..2e6da91611b 100644 --- a/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/BatchRequest.java +++ b/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/BatchRequest.java @@ -17,10 +17,7 @@ package org.apache.kyuubi.client.api.v1.dto; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -29,9 +26,9 @@ public class BatchRequest { private String resource; private String className; private String name; - private Map conf = Collections.emptyMap(); - private List args = Collections.emptyList(); - private Map extraResourcesMap = Collections.emptyMap(); + private Map conf = new HashMap<>(0); + private List args = new ArrayList<>(0); + private Map extraResourcesMap = new HashMap<>(0); public BatchRequest() {} @@ -91,7 +88,7 @@ public void setName(String name) { public Map getConf() { if (null == conf) { - return Collections.emptyMap(); + return new HashMap<>(0); } return conf; } @@ -102,7 +99,7 @@ public void setConf(Map conf) { public List getArgs() { if (null == args) { - return Collections.emptyList(); + return new ArrayList<>(0); } return args; }