You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bu...@apache.org on 2003/10/24 04:02:33 UTC
DO NOT REPLY [Bug 24084] New: -
Finalizers are non-canonical
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24084>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24084
Finalizers are non-canonical
Summary: Finalizers are non-canonical
Product: Lucene
Version: unspecified
Platform: All
OS/Version: Other
Status: NEW
Severity: Minor
Priority: Other
Component: Other
AssignedTo: lucene-dev@jakarta.apache.org
ReportedBy: esmond.pitt@bigpond.com
The canonical form of a Java finalizer is:
protected void finalize() throws Throwable()
{
try
{
// ... local code to finalize this class
}
catch (Throwable t)
{
}
super.finalize(); // finalize base class.
}
The finalizers in IndexReader, IndexWriter, and FSDirectory don't conform. This
is probably minor or null in effect, but the principle is important.
As a matter of fact FSDirectory.finaliz() is entirely redundant and could be
removed, as it doesn't do anything that RandomAccessFile.finalize would do
automatically.
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org