mirror of https://github.com/apache/lucene.git
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:
parent
edfce675a5
commit
24d827fd70
|
@ -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();
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue