lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject declared exceptions that are never thrown
Date Sun, 01 Aug 2004 16:49:09 GMT

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:

public void close() throws IOException {}
protected void seekInternal(long pos) throws IOException {}
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.



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

View raw message