lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Lucene's finalizeable objects
Date Fri, 20 Feb 2004 13:17:01 GMT
An interesting article from a person known to lucene-dev:

  http://www-106.ibm.com/developerworks/library/j-jtp01274.html

I only skimmed the article, and only read the section about
finalizeable objects.

Lucene has several:

$ ffjg finalize
./index/IndexWriter.java:  protected void finalize() throws IOException
{
./index/IndexReader.java:  protected final void finalize() throws
IOException {
./store/FSDirectory.java:  protected final void finalize() throws
IOException {
./store/FSDirectory.java:  protected final void finalize() throws
IOException {

Then I read the following, and noticed the
"FinalizeDoesNotCallSuperFinalize" rule:

  http://pmd.sourceforge.net/rules/finalizers.html

Then I looked at Lucene's finalize() methods and noticed that none of
them call super.finalize().

Now I'm wondering if they should.
I don't know enough about it to make strong statements, only point this
out to those who may know more, and can offer advice.

Otis


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