lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: declared exceptions that are never thrown
Date Fri, 06 Aug 2004 21:31:03 GMT
On Monday 02 August 2004 22:33, Doug Cutting wrote:

> I think these are mostly accidental.

> > Eclipse 3.0 has a nice warning (off by default) that let's you know if
> > a method has an exception in its throws clause which the method can
> > never throw. This happens in several places in Lucene, for example:
> >
> > TokenStream:
> > public void close() throws IOException {}

I chose a stupid example here, as TokenStream is an abstract class and the 
classes extending it might need to throw that exception. Besides that, I 
committed some cleanups that remove the useless "throws IOException" from 
non-public methods and public methods that are final. I think those 
changes cannot hurt.



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

View raw message