You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/29 22:18:00 UTC

[GitHub] [bookkeeper] Ghatage commented on a change in pull request #2469: java.lang.NullPointerException with metadataServiceUri = zk:///ledger…

Ghatage commented on a change in pull request #2469:
URL: https://github.com/apache/bookkeeper/pull/2469#discussion_r514599485



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java
##########
@@ -60,8 +60,12 @@
 
     protected static final String SCHEME = "zk";
 
-    public static String getZKServersFromServiceUri(URI uri) {
-        return uri.getAuthority().replace(";", ",");
+    public static String getZKServersFromServiceUri(URI uri) throws IllegalArgumentException {

Review comment:
       This is great @nicoloboschi!
   Can we also get a testcase for this?
   Also `getZKServersFromServiceUri` is used in multiple places - can we also account for those usages with respective `catch()` blocks for `IllegalArugmentException`?
   Otherwise we'll end up with an annoying stack trace.




----------------------------------------------------------------
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.

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