On 31 December 2016 at 14:42, Philippe Mouawad
<[email protected]> wrote:
> Hello,
> Do you agree with Sonar rule which says:
> "Remove the declaration of thrown exception 'XXXX' which is a runtime
> exception."
>
>
> I personally don't , I find it sometimes useful to have it explicitely
> mentioned
>
> We have 65 "issues" of that type.
>
> I propose to exclude it.

OK in general, but not every possible RTE should be mentioned.
It can be useful to document particular RTEs that may be encountered,
especially if the caller is expected to deal with them.

For example Integer.parseInt throws NumberFormatException which is an RTE.
IMO it would be really silly to drop that from the signature.


> --
> Regards.
> Philippe

Reply via email to