From 2432bdebe36674010ea4c20e9eb8ff7402227395 Mon Sep 17 00:00:00 2001 From: Pulak Ghosh Date: Wed, 6 Dec 2017 12:17:05 +0530 Subject: [PATCH] LUCENE-8075: Removed unnecessary null check in core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java. Closes #286 Signed-off-by: Adrien Grand --- lucene/CHANGES.txt | 3 +++ .../apache/lucene/codecs/blocktree/IntersectTermsEnum.java | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index f3335acfddb..c309a92030e 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -137,6 +137,9 @@ Other * LUCENE-8106: Add script (reproduceJenkinsFailures.py) to attempt to reproduce failing tests from a Jenkins log. (Steve Rowe) +* LUCENE-8075: Removed unnecessary null check in IntersectTermsEnum. + (Pulak Ghosh via Adrien Grand) + ======================= Lucene 7.2.0 ======================= API Changes diff --git a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java index 19e56a40a04..7521763f330 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java @@ -103,11 +103,8 @@ final class IntersectTermsEnum extends TermsEnum { arcs[arcIdx] = new FST.Arc<>(); } - if (fr.index == null) { - fstReader = null; - } else { - fstReader = fr.index.getBytesReader(); - } + + fstReader = fr.index.getBytesReader(); // TODO: if the automaton is "smallish" we really // should use the terms index to seek at least to