Skip to content

Commit

Permalink
[website] fix: pulsar website cli docs build error (apache#13518)
Browse files Browse the repository at this point in the history
Signed-off-by: LiLi <[email protected]>
  • Loading branch information
urfreespace authored Dec 29, 2021
1 parent 267e8f6 commit ee52cbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
import java.util.function.Function;
import java.util.function.Supplier;

import org.apache.commons.lang3.StringUtils;
import org.apache.pulsar.PulsarVersion;
import org.apache.pulsar.client.admin.PulsarAdmin;
import org.apache.pulsar.client.admin.PulsarAdminBuilder;
import org.apache.pulsar.client.admin.internal.PulsarAdminImpl;

import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;

public class PulsarAdminTool {

Expand Down Expand Up @@ -90,7 +90,7 @@ public class PulsarAdminTool {

PulsarAdminTool(Properties properties) throws Exception {
// fallback to previous-version serviceUrl property to maintain backward-compatibility
serviceUrl = StringUtils.isNotBlank(properties.getProperty("webServiceUrl"))
serviceUrl = isNotBlank(properties.getProperty("webServiceUrl"))
? properties.getProperty("webServiceUrl")
: properties.getProperty("serviceUrl");
authPluginClassName = properties.getProperty("authPlugin");
Expand All @@ -101,7 +101,7 @@ public class PulsarAdminTool {
boolean tlsEnableHostnameVerification = this.tlsEnableHostnameVerification != null
? this.tlsEnableHostnameVerification
: Boolean.parseBoolean(properties.getProperty("tlsEnableHostnameVerification", "false"));
final String tlsTrustCertsFilePath = StringUtils.isNotBlank(this.tlsTrustCertsFilePath)
final String tlsTrustCertsFilePath = isNotBlank(this.tlsTrustCertsFilePath)
? this.tlsTrustCertsFilePath
: properties.getProperty("tlsTrustCertsFilePath");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.Arrays;
import java.util.Properties;

import org.apache.commons.lang3.StringUtils;
import org.apache.pulsar.PulsarVersion;
import org.apache.pulsar.client.api.Authentication;
import org.apache.pulsar.client.api.AuthenticationFactory;
Expand Down Expand Up @@ -89,10 +88,10 @@ public class PulsarClientTool {
CmdGenerateDocumentation generateDocumentation;

public PulsarClientTool(Properties properties) {
this.serviceURL = StringUtils.isNotBlank(properties.getProperty("brokerServiceUrl"))
this.serviceURL = isNotBlank(properties.getProperty("brokerServiceUrl"))
? properties.getProperty("brokerServiceUrl") : properties.getProperty("webServiceUrl");
// fallback to previous-version serviceUrl property to maintain backward-compatibility
if (StringUtils.isBlank(this.serviceURL)) {
if (isBlank(this.serviceURL)) {
this.serviceURL = properties.getProperty("serviceUrl");
}
this.authPluginClassName = properties.getProperty("authPlugin");
Expand Down Expand Up @@ -142,7 +141,7 @@ private void updateConfig() throws UnsupportedAuthenticationException {
.tlsTrustStorePath(tlsTrustStorePath)
.tlsTrustStorePassword(tlsTrustStorePassword);

if (StringUtils.isNotBlank(proxyServiceURL)) {
if (isNotBlank(proxyServiceURL)) {
if (proxyProtocol == null) {
System.out.println("proxy-protocol must be provided with proxy-url");
System.exit(-1);
Expand Down

0 comments on commit ee52cbc

Please sign in to comment.