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_r201926608
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
    @@ -857,15 +869,15 @@ public void run() {
                             self.recreateSocketAddresses(self.getId());
                             addr = self.getElectionAddress();
                         }
    -                    LOG.info("My election bind port: " + addr.toString());
    +                    LOG.info("My election bind port: " + formatInetAddr(addr));
                         setName(addr.toString());
    --- End diff --
    
    using  `toString` can still distinguish ipv4 from ipv6 by looking at the ip style although
without `[] ` 
    if `formatInetAddr(addr)` is really needed, can you make sure all the places which log
`InetSocketAddress` are covered?


---

Mime
View raw message