Skip to content

Apache Lucene open-source search software

Clean up unused code & variables (#12994)

Dzung Bui2a851401a181
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<T> {
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<T> {
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;