protected if the cached stream got evicted on us

This commit is contained in:
kimchy 2010-06-03 20:48:57 +03:00
parent c68787aa4c
commit dbb7df742e
1 changed files with 7 additions and 1 deletions

View File

@ -213,7 +213,13 @@ public abstract class XContentNumberFieldMapper<T extends Number> extends XConte
*/
public void close() throws IOException {
numericTokenStream.close();
cachedStreams.get().get().get(precisionStep).add(this);
TIntObjectHashMap<Deque<CachedNumericTokenStream>> cached = cachedStreams.get().get();
if (cached != null) {
Deque<CachedNumericTokenStream> cachedDeque = cached.get(precisionStep);
if (cachedDeque != null) {
cachedDeque.add(this);
}
}
}
/**