You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/14 09:29:38 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #14670: Optimize ClientBuilderImpl

codelipenghui commented on a change in pull request #14670:
URL: https://github.com/apache/pulsar/pull/14670#discussion_r825743027



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientBuilderImpl.java
##########
@@ -323,9 +312,8 @@ public ClientBuilder clock(Clock clock) {
 
     @Override
     public ClientBuilder proxyServiceUrl(String proxyServiceUrl, ProxyProtocol proxyProtocol) {
-        if (StringUtils.isNotBlank(proxyServiceUrl) && proxyProtocol == null) {
-            throw new IllegalArgumentException("proxyProtocol must be present with proxyServiceUrl");
-        }
+        checkArgument(StringUtils.isBlank(proxyServiceUrl) || proxyProtocol != null,
+                "proxyProtocol must be present with proxyServiceUrl");

Review comment:
       What is the expected behavior here? Both the `proxyServiceUrl` and `proxyProtocol` can not be null or empty?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org