>
> This is not good style: Unchecked exceptions in method signatures do not
> offer any guarantee to the caller; not that only those exceptions will be
> thrown and not even that these exceptions can actually be thrown.
> Thus, it brings a level of redundancy (between Javadoc and signatures) that
> must be kept in sync manually; this is a burden and has no benefit.[1]
> Unchecked exceptions must be documented in Javadoc, but should not appear in
> method signatures (at least, not systematically).
>
>
> Best regards,
> Gilles
>
> [1] Luc likes to have the exception in the signatures because, as a CM
>    developer, he can (temporarily) change the definition of an exception
>    (to make it "checked") and then the compiler will tell whether some
>    (user) code is prepared to handle that exception. But who else is going
>    to do that?
>
Thanks for this clarification. I was merely referring to the
developer's guide, which should certainly be modified. I'm otherwise
happy to revert my changes (I do not like having unchecked exceptions
in the signature of a method).
Sébastien


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to