From dev-return-70431-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Jun 8 23:33:22 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C7406180608 for ; Fri, 8 Jun 2018 23:33:21 +0200 (CEST) Received: (qmail 45173 invoked by uid 500); 8 Jun 2018 21:33:20 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 45151 invoked by uid 99); 8 Jun 2018 21:33:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2018 21:33:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C705AE0BBD; Fri, 8 Jun 2018 21:33:19 +0000 (UTC) From: hanm To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org References: In-Reply-To: Subject: [GitHub] zookeeper pull request #534: ZOOKEEPER-2184 Zookeeper Client should re-resol... Content-Type: text/plain Message-Id: <20180608213319.C705AE0BBD@git1-us-west.apache.org> Date: Fri, 8 Jun 2018 21:33:19 +0000 (UTC) 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 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.). ---