diff --git a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/rm/external/kubernetes/KubernetesResourceRequester.java b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/rm/external/kubernetes/KubernetesResourceRequester.java index ac0aafb327..c886b622ab 100644 --- a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/rm/external/kubernetes/KubernetesResourceRequester.java +++ b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/rm/external/kubernetes/KubernetesResourceRequester.java @@ -171,7 +171,7 @@ public Boolean reloadExternalResourceAddress(ExternalResourceProvider provider) private String getK8sMasterUrl(ExternalResourceProvider provider) { Map configMap = provider.getConfigMap(); String k8sMasterUrl = (String) configMap.get("k8sMasterUrl"); - if (StringUtils.isEmpty(k8sMasterUrl)) { + if (StringUtils.isBlank(k8sMasterUrl)) { throw new IllegalArgumentException("k8sMasterUrl is empty, please check the configuration."); } return k8sMasterUrl; @@ -183,7 +183,7 @@ private void constructKubernetesClient(ExternalResourceProvider provider) { String k8sMasterUrl = getK8sMasterUrl(provider); try { String k8sConfig = (String) configMap.get("k8sConfig"); - if (StringUtils.isNotEmpty(k8sConfig)) { + if (StringUtils.isNotBlank(k8sConfig)) { Config kubeConfig = Config.fromKubeconfig( null, FileUtils.readFileToString(new File(k8sConfig), "UTF-8"), null);