Skip to content

Commit

Permalink
add tlsEnabled check for non-Tls serviceUrl check
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzming committed Oct 30, 2023
1 parent c4ff7b9 commit 1f221ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ public PulsarAdmin getClusterPulsarAdmin(String cluster, Optional<ClusterData> c
if (isTlsEnabled && StringUtils.isEmpty(data.getServiceUrlTls())) {
throw new IllegalArgumentException("serviceUrlTls is empty, brokerClientTlsEnabled: "
+ isTlsEnabled);
} else if (StringUtils.isEmpty(data.getServiceUrl())) {
} else if (!isTlsEnabled && StringUtils.isEmpty(data.getServiceUrl())) {
throw new IllegalArgumentException("serviceUrl is empty, brokerClientTlsEnabled: " + isTlsEnabled);
}
String adminApiUrl = isTlsEnabled ? data.getServiceUrlTls() : data.getServiceUrl();
Expand Down

0 comments on commit 1f221ae

Please sign in to comment.