From b7bcad0360d08a2ca443ab64607b3dd8395c8a65 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 25 Jan 2013 16:01:34 +0000 Subject: [PATCH] fix nocommits git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1438568 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/lucene/codecs/DocValuesConsumer.java | 4 ++-- .../java/org/apache/lucene/index/DocValuesProcessor.java | 5 +++-- .../apache/lucene/index/TwoStoredFieldsConsumers.java | 9 ++------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java b/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java index 5038de19bb6..7ba6f022065 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java @@ -77,7 +77,7 @@ public abstract class DocValuesConsumer implements Closeable { } assert nextIsSet; nextIsSet = false; - // nocommit make a mutable number + // TODO: make a mutable number return nextValue; } @@ -146,7 +146,7 @@ public abstract class DocValuesConsumer implements Closeable { } assert nextIsSet; nextIsSet = false; - // nocommit make a mutable number + // TODO: make a mutable number return nextValue; } diff --git a/lucene/core/src/java/org/apache/lucene/index/DocValuesProcessor.java b/lucene/core/src/java/org/apache/lucene/index/DocValuesProcessor.java index a7268712310..e89cff08c79 100644 --- a/lucene/core/src/java/org/apache/lucene/index/DocValuesProcessor.java +++ b/lucene/core/src/java/org/apache/lucene/index/DocValuesProcessor.java @@ -30,8 +30,9 @@ import org.apache.lucene.util.IOUtils; final class DocValuesProcessor extends StoredFieldsConsumer { - // nocommit wasteful we also keep a map ... double the - // hash lookups ... would be better if DFP had "the one map"? + // TODO: somewhat wasteful we also keep a map here; would + // be more efficient if we could "reuse" the map/hash + // lookup DocFieldProcessor already did "above" private final Map writers = new HashMap(); private final Counter bytesUsed; diff --git a/lucene/core/src/java/org/apache/lucene/index/TwoStoredFieldsConsumers.java b/lucene/core/src/java/org/apache/lucene/index/TwoStoredFieldsConsumers.java index 1efbc47e982..e0d68cbe3d4 100644 --- a/lucene/core/src/java/org/apache/lucene/index/TwoStoredFieldsConsumers.java +++ b/lucene/core/src/java/org/apache/lucene/index/TwoStoredFieldsConsumers.java @@ -62,12 +62,7 @@ class TwoStoredFieldsConsumers extends StoredFieldsConsumer { @Override void finishDocument() throws IOException { - // nocommit must this be a try/finally...? i'd prefer - // not ... - try { - first.finishDocument(); - } finally { - second.finishDocument(); - } + first.finishDocument(); + second.finishDocument(); } }