On Fri, Feb 10, 2012 at 10:58:30AM +0100, Sébastien Brisard wrote:
> Hi Thomas,
> 2012/2/10 Thomas Neidhart <thomas.neidh...@gmail.com>:
> > On 02/10/2012 09:58 AM, Sébastien Brisard wrote:
> >> Hello,
> >>>
> >>> I strongly prefer _not_ to have the (unchecked) exceptions in the 
> >>> signature.
> >>> [Arguments mentioned numerous times in previous discussions...]
> >>>
> >> It's true it has been argued only recently. I was just wondering
> >> whether it might be worth configuring checkstyle so as to make it
> >> complain about unchecked exceptions in the signature. I'm not a CS
> >> guru, so I don't know whether this is possible, but that would help
> >> new committers!
> >
> > Yes indeed. I have search the ML about this topic, and had found this
> > thread:
> >
> > http://markmail.org/message/ulhxnhplkja4iwbs?q=exceptions+list:org.apache.commons.dev/#query:exceptions%20list%3Aorg.apache.commons.dev%2F+page:1+mid:7iymuihzhy3nimum+state:results
> >
> > and the developer's guideline for CM also states this:
> >
> > All public methods advertise all exceptions that they can generate.
> > Exceptions must be documented in both javadoc and method signatures and
> > the documentation in the javadoc must include full description of the
> > conditions under which exceptions are thrown.
> >
> > Could you give me some pointers about more recent discussions? I am
> > basically fine with the approach chosen, but would like to be consistent
> > in the way I contribute or edit code.
> >
> Here is a recent thread on this issue (as you can see, this thread was
> caused by a faulty commit from me...).
> Best regards,
> Sébastien
> 
> http://mail-archives.apache.org/mod_mbox/commons-dev/201201.mbox/%3C20120113105913.GM6537%40dusk.harfang.homelinux.org%3E
> 

It was not a faulty commit since you followed the rule stated in the
developer's manual, as Thomas just pointed out. ;-}
Let's note that the manual is not always up-to-date; but in this particular
case, the difficulty is compounded because we don't all have the same
feeling about this rule.
I'd just say that we should not add systematically the exceptions to the
signature. Those who like it would do it in the code they often contribute
to, hopefully not cluttering the code which they don't have to test very
often...


Best regards,
Gilles


[1] And by the fact that the exception debate has generated so much
discussion in the past 18 months that I didn't want to write a document
about the new exceptions, that would be irrelevant a few weeks later...

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

Reply via email to