michaeljmarshall commented on code in PR #19762:
URL: https://github.com/apache/pulsar/pull/19762#discussion_r1142317438


##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/URIPreconditions.java:
##########
@@ -67,7 +67,7 @@ public static void checkURIIfPresent(@Nullable String uri,
     public static void checkURIIfPresent(@Nullable String uri,
                                          @Nonnull Predicate<URI> predicate,
                                          @Nullable String errorMessage) throws 
IllegalArgumentException {
-        if (uri == null) {
+        if (uri == null || uri.length() == 0) {

Review Comment:
   I think one risk here is that it is now possible to create a cluster with 
all empty cluster urls. I think it might make sense to verify that there is 
some URL that is not zero length.
   
   Additionally, one benefit of this change is for clusters that only want to 
supply a TLS url.
   
   What is your opinion @nodece?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to