lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: FSDirectory.makeLock() declared final
Date Mon, 30 Aug 2004 16:22:20 GMT
Mike Hearn wrote:
> I can't see any obvious reason for this. The usual motivation given is 
> speed, but this article:
> ... strongly implies that it doesn't make much difference at all, and 
> the opinion of the writer is certainly that the losses outweigh the gains.

Back in 1998, when FSDirectory was first written, 'final' did actually 
make some things faster.  It permitted 'javac' to inline more things. 
It also held the promise that future compilers might do more with it. 
Well, now here we are in the future, and all we have are a bunch of 
final declarations!

Note too that a few of Lucene's final declarations are there because 
classes and/or methods really should not be overridden.  I don't think 
FSDirectory falls into this category.  So I support making FSDirectory 
and its methods non-final.


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

View raw message