diff --git a/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ConfigResolving.java b/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ConfigResolving.java index eab5f6b0e..bda0497ed 100644 --- a/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ConfigResolving.java +++ b/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ConfigResolving.java @@ -1,13 +1,21 @@ package com.databricks.sdk.core; import com.databricks.sdk.core.utils.Environment; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.Map; import java.util.function.Supplier; public interface ConfigResolving { default void resolveConfig(DatabricksConfig config, Supplier> envGetter) { - String[] path = envGetter.get().get("PATH").split(":"); + String pathStr = envGetter.get().get("PATH"); + List path = new ArrayList<>(); + if (pathStr != null) { + path.addAll(Arrays.asList(pathStr.split(":"))); + } Environment env = new Environment(envGetter.get(), path); config.resolve(env); }