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 declared exceptions that are never thrown
Date Sun, 01 Aug 2004 16:49:09 GMT
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

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