[ 
https://issues.apache.org/jira/browse/POOL-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100666#comment-14100666
 ] 

Sebb commented on POOL-269:
---------------------------

I agree that throws clauses should only show the specific exceptions, and the 
causes should be documented.

Changing throws clauses does not affect binary compat [1], but it does affect 
source compat, so users of the new version may need to make code changes if the 
throws clauses are specialized.

[1] http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.21

> Specialize useless throws Exception
> -----------------------------------
>
>                 Key: POOL-269
>                 URL: https://issues.apache.org/jira/browse/POOL-269
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Michael Osipov
>
> Too many methods say {{throws Exception}} in their signature. This is neither 
> helpful nor good API design. You never know what the exception is and where 
> it came from.
> An exception translation pattern has to be applied to make code usable, e.g., 
> like the Spring project does or Maven with {{BuildException}}.
> Unfortunately, this ugly practive has prevailed in several Apache projects 
> like Lucene.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to