Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/534#discussion_r201456782
  
    --- 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.



---

Reply via email to