Skip to content

Commit

Permalink
Correctly handle empty labels string
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
  • Loading branch information
mmorhun committed Nov 25, 2020
1 parent 19cf5f6 commit b660de8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public KubernetesTrustedCAProvisioner(
@Named("che.infra.kubernetes.trusted_ca.dest_configmap") String configMapName,
@Named("che.infra.kubernetes.trusted_ca.mount_path") String certificateMountPath,
@Nullable @Named("che.infra.kubernetes.trusted_ca.dest_configmap_labels")
String configMapLabel,
String configMapLabels,
CheInstallationLocation cheInstallationLocation,
KubernetesNamespaceFactory namespaceFactory,
CheServerKubernetesClientFactory cheServerClientFactory)
Expand All @@ -75,9 +75,9 @@ public KubernetesTrustedCAProvisioner(
this.installationLocationNamespace = cheInstallationLocation.getInstallationLocationNamespace();
this.namespaceFactory = namespaceFactory;

if (configMapLabel != null) {
if (configMapLabels != null && !configMapLabels.trim().equals("")) {
this.configMapLabelKeyValue =
Splitter.on(",").withKeyValueSeparator("=").split(configMapLabel);
Splitter.on(",").withKeyValueSeparator("=").split(configMapLabels);
} else {
this.configMapLabelKeyValue = new HashMap<>();
}
Expand Down

0 comments on commit b660de8

Please sign in to comment.