lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: declared exceptions that are never thrown
Date Mon, 02 Aug 2004 20:33:17 GMT
I think these are mostly accidental.

Daniel Naber wrote:
> Hi,
> 
> 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 {}
> CSInputStream:
> protected void seekInternal(long pos) throws IOException {}
> IndexReader:
> protected final void finalize() throws IOException {...
> 
> Has this been done on purpose, for example so that the implementation can 
> later be changed without adding that clause (and thus changing the API)? 
> That's the only reason I can think of. If there's no reason for these 
> exceptions, I'd like to remove them.
> 
> Regards
>  Daniel
> 

---------------------------------------------------------------------
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