- LUCENE-436: removed finalize() methods

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@489183 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Otis Gospodnetic 2006-12-20 19:45:40 +00:00
parent fa71e29bd4
commit 42592aeb49
3 changed files with 7 additions and 18 deletions

View File

@ -40,6 +40,12 @@ Changes in runtime behavior
Enumeration.
(Michael Busch via Otis Gospodnetic)
8. LUCENE-436: Removed finalize() in TermInfosReader and SegmentReader,
and added a call to enumerators.remove() in TermInfosReader.close().
The finalize() overrides were added to help with a pre-1.4.2 JVM bug
that has since been fixed, plus we no longer support pre-1.4.2 JVMs.
(Otis Gospodnetic)
New features
1. LUCENE-503: New ThaiAnalyzer and ThaiWordFilter in contrib/analyzers

View File

@ -187,15 +187,6 @@ class SegmentReader extends IndexReader {
}
}
protected void finalize() throws Throwable {
try {
// patch for pre-1.4.2 JVMs, whose ThreadLocals leak
termVectorsLocal.set(null);
} finally {
super.finalize();
}
}
protected void doCommit() throws IOException {
if (deletedDocsDirty) { // re-write deleted
String oldDelFileName = si.getDelFileName();

View File

@ -55,15 +55,6 @@ final class TermInfosReader {
fieldInfos, true);
}
protected void finalize() throws Throwable {
try {
// patch for pre-1.4.2 JVMs, whose ThreadLocals leak
enumerators.set(null);
} finally {
super.finalize();
}
}
public int getSkipInterval() {
return origEnum.skipInterval;
}
@ -73,6 +64,7 @@ final class TermInfosReader {
origEnum.close();
if (indexEnum != null)
indexEnum.close();
enumerators.remove();
}
/** Returns the number of term/value pairs in the set. */