From dev-return-79313-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Sun Mar 17 14:32:54 2019 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 E1A6618077A for ; Sun, 17 Mar 2019 15:32:53 +0100 (CET) Received: (qmail 35111 invoked by uid 500); 17 Mar 2019 14:32:52 -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 35090 invoked by uid 99); 17 Mar 2019 14:32:52 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Mar 2019 14:32:52 +0000 From: GitBox To: dev@zookeeper.apache.org Subject: [GitHub] [zookeeper] maoling commented on a change in pull request #823: ZOOKEEPER-2694:sync CLI command does not wait for result from server Message-ID: <155283317226.11373.11851958786722104126.gitbox@gitbox.apache.org> Date: Sun, 17 Mar 2019 14:32:52 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit maoling commented on a change in pull request #823: ZOOKEEPER-2694:sync CLI command does not wait for result from server URL: https://github.com/apache/zookeeper/pull/823#discussion_r266242244 ########## File path: zookeeper-server/src/main/java/org/apache/zookeeper/cli/SyncCommand.java ########## @@ -55,14 +57,18 @@ public CliCommand parse(String[] cmdArgs) throws CliParseException { @Override public boolean exec() throws CliException { String path = args[1]; + CountDownLatch latch = new CountDownLatch(1); + final int[] resultCode = new int[1]; Review comment: when use a plain integer, a anonymous Inner Class needs it to be modified with `final `,then we cannot assignment and transfer the result outside. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services