diff --git a/lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java b/lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java index d51c256d48e..df928400cc7 100644 --- a/lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java +++ b/lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java @@ -828,7 +828,8 @@ private void freezeTail(int prefixLenPlus1) throws IOException { // FSTEnum, Util, etc., have trouble w/ non-final // dead-end states: - // TODO: is node.numArcs == 0 always false? we no longer prune any nodes from FST: + // node.numArcs == 0 happens on last node. But it is final, we still can remove node.numArcs + // == 0. final boolean isFinal = node.isFinal || node.numArcs == 0; // this node makes it and we now compile it. first,