From 3d5532d75badb858583c189a744e9a647161640f Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 7 Jul 2011 13:34:32 +0000 Subject: [PATCH] fixed possible NPE if called during initialization git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1143814 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/lucene/index/codecs/DefaultDocValuesProducer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/index/codecs/DefaultDocValuesProducer.java b/lucene/src/java/org/apache/lucene/index/codecs/DefaultDocValuesProducer.java index 45b9efabbc5..07477086784 100644 --- a/lucene/src/java/org/apache/lucene/index/codecs/DefaultDocValuesProducer.java +++ b/lucene/src/java/org/apache/lucene/index/codecs/DefaultDocValuesProducer.java @@ -185,8 +185,7 @@ public class DefaultDocValuesProducer extends PerDocValues { list.add(cfs); toClose = list; } else { - toClose = docValues.values(); - + toClose = closeables; } IOUtils.closeSafely(false, toClose); }