Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5A4C6200C60 for ; Mon, 24 Apr 2017 23:56:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 58FD7160B99; Mon, 24 Apr 2017 21:56:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C723F160B93 for ; Mon, 24 Apr 2017 23:56:15 +0200 (CEST) Received: (qmail 38779 invoked by uid 500); 24 Apr 2017 21:56:14 -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 38768 invoked by uid 99); 24 Apr 2017 21:56:14 -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; Mon, 24 Apr 2017 21:56:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 85FF9DFFAB; Mon, 24 Apr 2017 21:56:14 +0000 (UTC) From: afine To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org Message-ID: Subject: [GitHub] zookeeper pull request #240: ZOOKEEPER-2757: Incorrect path crashes zkCli Content-Type: text/plain Date: Mon, 24 Apr 2017 21:56:14 +0000 (UTC) archived-at: Mon, 24 Apr 2017 21:56:16 -0000 GitHub user afine opened a pull request: https://github.com/apache/zookeeper/pull/240 ZOOKEEPER-2757: Incorrect path crashes zkCli This issue is caused by us relying on `IllegalArgumentException` in `PathUtils#validatePath`. `IllegalArgumentException` is an unchecked exception and we never catch it within each individual *Command.java, so it bubbles up and killed the CLI. Given that throwing `IllegalArgumentException` is part of ZooKeeper's API, I believe that unfortunately we can not change this behavior at this time. This patch catches `IllegalArgumentException` and wraps it, so the CLI prints an error but does not quit. I believe I handled all of the relevant commands, please check to make sure I am not missing one. You can merge this pull request into a Git repository by running: $ git pull https://github.com/afine/zookeeper ZOOKEEPER-2757 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zookeeper/pull/240.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #240 ---- commit 46dce3f1c5c219b72e4e046c0bb42c1201d44238 Author: Abraham Fine Date: 2017-04-24T21:47:29Z ZOOKEEPER-2757: Incorrect path crashes zkCli ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---