From 2a851401a1815883087092659c77981be409f1c6 Mon Sep 17 00:00:00 2001 From: Dzung Bui Date: Fri, 12 Jan 2024 02:43:25 +0900 Subject: [PATCH] Clean up unused code & variables (#12994) --- .../java/org/apache/lucene/util/fst/FSTCompiler.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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 eaf26bb91eb..c3238bdaf4b 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 @@ -908,17 +908,16 @@ public class FSTCompiler { assert validOutput(lastOutput); final T commonOutputPrefix; - final T wordSuffix; if (lastOutput != NO_OUTPUT) { commonOutputPrefix = fst.outputs.common(output, lastOutput); assert validOutput(commonOutputPrefix); - wordSuffix = fst.outputs.subtract(lastOutput, commonOutputPrefix); + T wordSuffix = fst.outputs.subtract(lastOutput, commonOutputPrefix); assert validOutput(wordSuffix); parentNode.setLastOutput(input.ints[input.offset + idx - 1], commonOutputPrefix); node.prependOutput(wordSuffix); } else { - commonOutputPrefix = wordSuffix = NO_OUTPUT; + commonOutputPrefix = NO_OUTPUT; } output = fst.outputs.subtract(output, commonOutputPrefix); @@ -1113,13 +1112,6 @@ public class FSTCompiler { arc.isFinal = isFinal; } - void deleteLast(int label, Node target) { - assert numArcs > 0; - assert label == arcs[numArcs - 1].label; - assert target == arcs[numArcs - 1].target; - numArcs--; - } - void setLastOutput(int labelToMatch, T newOutput) { assert owner.validOutput(newOutput); assert numArcs > 0;