LUCENE-1715: remove finalize from IndexWriter, DirectoryReader

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@787744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-06-23 16:31:53 +00:00
parent edfce675a5
commit 24d827fd70
2 changed files with 0 additions and 24 deletions

View File

@ -772,18 +772,6 @@ class DirectoryReader extends IndexReader implements Cloneable {
} }
} }
/** Release the write lock, if needed. */
protected void finalize() throws Throwable {
try {
if (writeLock != null) {
writeLock.release(); // release write lock
writeLock = null;
}
} finally {
super.finalize();
}
}
public Map getCommitUserData() { public Map getCommitUserData() {
ensureOpen(); ensureOpen();
return segmentInfos.getUserData(); return segmentInfos.getUserData();

View File

@ -2192,18 +2192,6 @@ public class IndexWriter {
return useCompoundDocStore; return useCompoundDocStore;
} }
/** Release the write lock, if needed. */
protected void finalize() throws Throwable {
try {
if (writeLock != null) {
writeLock.release(); // release write lock
writeLock = null;
}
} finally {
super.finalize();
}
}
/** Returns the Directory used by this index. */ /** Returns the Directory used by this index. */
public Directory getDirectory() { public Directory getDirectory() {
// Pass false because the flush during closing calls getDirectory // Pass false because the flush during closing calls getDirectory