lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <daniel.na...@t-online.de>
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.

Regards
 Daniel

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message