IndexBuilder: Close IncrementalIndex when done. (#3734)

This commit is contained in:
Gian Merlino 2016-12-02 14:56:34 -08:00 committed by Parag Jain
parent 353fee79dd
commit f4cc8c2b2f
1 changed files with 1 additions and 2 deletions

View File

@ -118,8 +118,7 @@ public class IndexBuilder
{
Preconditions.checkNotNull(indexMerger, "indexMerger");
Preconditions.checkNotNull(tmpDir, "tmpDir");
final IncrementalIndex incrementalIndex = buildIncrementalIndex();
try {
try (final IncrementalIndex incrementalIndex = buildIncrementalIndex()) {
return TestHelper.getTestIndexIO().loadIndex(
indexMerger.persist(
incrementalIndex,