zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #534: ZOOKEEPER-2184 Zookeeper Client should re-resol...
Date Fri, 08 Jun 2018 21:33:19 GMT
Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/534#discussion_r194185189
  
    --- Diff: src/java/main/org/apache/zookeeper/client/StaticHostProvider.java ---
    @@ -73,15 +80,27 @@
          *             if serverAddresses is empty or resolves to an empty list
          */
         public StaticHostProvider(Collection<InetSocketAddress> serverAddresses) {
    -       sourceOfRandomness = new Random(System.currentTimeMillis() ^ this.hashCode());
    +        init(serverAddresses,
    --- End diff --
    
    I think what @lvfangmin meant is instead of duplicating the code inside three constructors,
only keep one concrete parameterized constructor implementation and let the other two invoke
that one (with different parameters.).


---

Mime
View raw message