Skip to content

Apache Lucene open-source search software

Simplify FST return (#13771)

mrhbj91c6954e2430
diff --git a/lucene/core/src/java/org/apache/lucene/util/fst/FST.java b/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
index 725ec7bcedd..eb780acc245 100644
--- a/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
+++ b/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
@@ -624,7 +624,6 @@ public final class FST<T> implements Accountable {
arc.output = follow.nextFinalOutput();
arc.flags = BIT_LAST_ARC;
arc.nodeFlags = arc.flags;
- return arc;
} else {
in.setPosition(follow.target());
byte flags = arc.nodeFlags = in.readByte();
@@ -677,8 +676,8 @@ public final class FST<T> implements Accountable {
readNextRealArc(arc, in);
}
assert arc.isLast();
- return arc;
}
+ return arc;
}
private long readUnpackedNodeTarget(BytesReader in) throws IOException {