nodece commented on code in PR #19762:
URL: https://github.com/apache/pulsar/pull/19762#discussion_r1142509932
##########
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.
Sure, I agreed with you! We must ensure that at least one URL is a non-zero
length when creating the cluster.
Do you make a PR to do that? Recently, I don't have time to maintain the
Pulsar :(
##########
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:
@michaeljmarshall
--
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]