Return-Path: X-Original-To: apmail-helix-commits-archive@minotaur.apache.org Delivered-To: apmail-helix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E1476F934 for ; Tue, 2 Apr 2013 20:05:36 +0000 (UTC) Received: (qmail 90109 invoked by uid 500); 2 Apr 2013 20:05:36 -0000 Delivered-To: apmail-helix-commits-archive@helix.apache.org Received: (qmail 90077 invoked by uid 500); 2 Apr 2013 20:05:36 -0000 Mailing-List: contact commits-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.apache.org Delivered-To: mailing list commits@helix.apache.org Received: (qmail 90070 invoked by uid 99); 2 Apr 2013 20:05:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Apr 2013 20:05:36 +0000 X-ASF-Spam-Status: No, hits=-2002.3 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 02 Apr 2013 20:05:35 +0000 Received: (qmail 89295 invoked by uid 99); 2 Apr 2013 20:05:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Apr 2013 20:05:14 +0000 Date: Tue, 2 Apr 2013 20:05:14 +0000 (UTC) From: "Max Calderoni (JIRA)" To: commits@helix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (HELIX-75) ZKHelixManager declares throws Exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HELIX-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Max Calderoni closed HELIX-75. ------------------------------ > ZKHelixManager declares throws Exception > ---------------------------------------- > > Key: HELIX-75 > URL: https://issues.apache.org/jira/browse/HELIX-75 > Project: Apache Helix > Issue Type: Bug > Components: helix-core > Affects Versions: 0.6.0-incubating > Reporter: Max Calderoni > Assignee: kishore gopalakrishna > Priority: Minor > Fix For: 0.6.1-incubating > > Attachments: helix-75.patch > > > I noticed that in the signature of ZKHelixManager's constructor (and consequently, in HelixManagerFactory.getZKHelixManager()) there is a throws Exception clause. > Two questions: > 1. that constructor does not really throw any Exception so that throws clause can be removed. > 2. even if you wanted to keep that throws clause for some reason, did you really mean to throw 'Exception' or something more specific than that in the API? > Because that forces client code to catch runtime exceptions, which you normally don't really want to catch, nor want to be forced to carry along 'throws Exception'. > In general, i noticed in code that there are other parts where things declare 'throws Exception'. > If that is a choice for the internal code, fine, but again, if it is API, would be best if users were not forced by that practice. > If all that was meant, could you please explain the arguments for this particular choice of throwing 'Exception'. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira