From 4f0e7add692fd3fc968357e5449d595bdc07ec29 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Tue, 17 Jan 2012 15:57:18 +0000 Subject: [PATCH] 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 --- .../src/java/org/apache/lucene/search/FieldCacheImpl.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java b/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java index 7a1605b54a9..895e5106a74 100644 --- a/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java +++ b/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java @@ -172,12 +172,7 @@ class FieldCacheImpl implements FieldCache { // rather than relying on gc: Object key = reader.getCoreCacheKey(); if (key instanceof IndexReader) { - ((IndexReader)key).addReaderClosedListener(new IndexReader.ReaderClosedListener() { - @Override - public void onClose(IndexReader reader) { - FieldCache.DEFAULT.purge(reader); - } - }); + ((IndexReader)key).addReaderClosedListener(purgeReader); } } }