helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Calderoni (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (HELIX-75) ZKHelixManager declares throws Exception
Date Tue, 02 Apr 2013 20:05:14 GMT

     [ 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
> 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
> 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

View raw message