commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <>
Subject [jira] [Commented] (POOL-268) Remove throws <RuntimeException> from all method signatures
Date Mon, 18 Aug 2014 14:35:18 GMT


Michael Osipov commented on POOL-268:

Conditions must be documented in Javadoc, not thrown. Runtime exceptions aren't recoverable
so there is no point in throwing them explicitly.

> Remove throws <RuntimeException> from all method signatures
> -----------------------------------------------------------
>                 Key: POOL-268
>                 URL:
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Michael Osipov
> Unfortunately, many signatures carry a {{throws <RuntimeException>}} like {{IllegalStateException}},
etc. This is incorrect. A runtime exception never appears in the signature but only in the
Javadocs because runtime exception indicate a programming error.
> This violates against Java programming rules and Joshua Bloch's Effective Java.

This message was sent by Atlassian JIRA

View raw message