Skip to content

Commit

Permalink
fix: replace 'empty' with 'blank'
Browse files Browse the repository at this point in the history
  • Loading branch information
lenoxzhao committed Sep 20, 2023
1 parent 44af15b commit 67b05ea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public Boolean reloadExternalResourceAddress(ExternalResourceProvider provider)
private String getK8sMasterUrl(ExternalResourceProvider provider) {
Map<String, Object> 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;
Expand All @@ -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);
Expand Down

0 comments on commit 67b05ea

Please sign in to comment.