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 Tue, 10 Jul 2018 18:55:42 GMT
Github user hanm commented on a diff in the pull request:

    --- 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 --
    Yeah, I think referencing this before the object is constructed is prohibited. I think
we can probably get around it but it looks like not worth the extra effort (I don't know a
simple of way of doing it without dropping using the this.hashCode). 
    So I am ok with the current form of having all ctors invoking init method.


View raw message