zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maoling <...@git.apache.org>
Subject [GitHub] zookeeper pull request #548: [ZOOKEEPER-3057] Fix IPv6 literal usage
Date Thu, 12 Jul 2018 06:55:15 GMT
Github user maoling commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/548#discussion_r201923508
  
    --- Diff: src/java/main/org/apache/zookeeper/server/util/ConfigUtils.java ---
    @@ -61,10 +61,16 @@ static public String getClientConfigStr(String configData) {
             return version + " " + sb.toString();
         }
     
    +    /**
    +     * Splits server config to server and port
    +     * with support for IPv6 literals
    +     * @return String[] first element being the
    +     *  IP address and the next being the port
    +     * @param s server config, server:port
    +     */
         public static String[] splitServerConfig(String s)
             throws ConfigException
    --- End diff --
    
    `splitServerConfig` is somewhat general. `getHostAndPort` is better?


---

Mime
View raw message