You are right, I am not sure it makes any significant difference in
speed. The only situation where I know it can help is in ProGuard
optimization as it can perform inlining as a result. The better
argument is just for correctness -- if you aren't sure you set up the
class for subclassing, prohibit it.

But if there are helpful reasons to make classes extendable, leave it so, yes.

One alternate answer is to use interfaces more heavily so that it's
not necessary to subclass concrete classses for mocking purposes. This
is the road I went myself.

On Fri, Aug 22, 2008 at 6:29 PM, Ted Dunning <[EMAIL PROTECTED]> wrote:
>
> +10^10
>
> The final declarations in Lucene make it nearly impossible to mock up tests
> that use Lucene objects.  TRULY a pain.
>
> I have almost never seen a final declaration make any difference in speed on
> modern Java platforms.
>

Reply via email to