mirror of https://github.com/apache/lucene.git
LUCENE-3646: Fix a code relict from previous times :-)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1232450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dea4b911da
commit
4f0e7add69
|
@ -172,12 +172,7 @@ class FieldCacheImpl implements FieldCache {
|
||||||
// rather than relying on gc:
|
// rather than relying on gc:
|
||||||
Object key = reader.getCoreCacheKey();
|
Object key = reader.getCoreCacheKey();
|
||||||
if (key instanceof IndexReader) {
|
if (key instanceof IndexReader) {
|
||||||
((IndexReader)key).addReaderClosedListener(new IndexReader.ReaderClosedListener() {
|
((IndexReader)key).addReaderClosedListener(purgeReader);
|
||||||
@Override
|
|
||||||
public void onClose(IndexReader reader) {
|
|
||||||
FieldCache.DEFAULT.purge(reader);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue