LUCENE-5656: don't leak dv producers if one of them throws exception

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1593238 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2014-05-08 11:05:06 +00:00
parent 8806d866fc
commit 90c582d84e
1 changed files with 1 additions and 2 deletions

View File

@ -187,13 +187,12 @@ public final class SegmentReader extends AtomicReader {
Long gen = e.getKey();
List<FieldInfo> infos = e.getValue();
DocValuesProducer dvp = segDocValues.getDocValuesProducer(gen, si, IOContext.READ, dir, dvFormat, infos);
dvGens.add(gen);
for (FieldInfo fi : infos) {
dvProducersByField.put(fi.name, dvp);
}
dvProducers.add(dvp);
}
dvGens.addAll(genInfos.keySet());
}
/**