commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niall Pemberton <>
Subject Re: [resources] Preparation for a Release Candidate
Date Fri, 25 Nov 2005 04:14:54 GMT
On 11/23/05, Martin Cooper <> wrote:
> On 11/22/05, Niall Pemberton <> wrote:
> >
> > 1) Quite a few methods are declaring in the javadoc that they throw
> > RuntimeExceptions, which are coming out on the checkstyle:
> >
> >
> > My preferenc is to removed these, but I can understand why they were put
> > in.
> > Opinions?
> I think the code should say what it means. ;-) Looking at,
> the init() and destroy() methods declare that they throw ResourcesException
> (and Javadoc that). All of the other methods do not declare that they throw
> that exception, but the Javadocs say they do. If they really do (or can),
> then they should declare that. If they don't, then we should remove the
> Javadocs.

They can throw those exceptions, but since they're derived from
RuntimeExceptions it doesn't make any difference wether they're in the
method signature or not. I've changed my mind and think we should
leave them as it is - the javadoc informs people that they can be
thrown - whether they choose to handle them or not is up to them. Sun
does the same kind of thing in java.util.ResourceBundle in java 1.4 -
its getObject() method has Runtime exceptions in the javadoc, but not
the method signature.


> My tuppence.
> --
> Martin Cooper

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message