Apache Lucene open-source search software
LUCENE-8167: fix three incompleteEnumSwitch warnings
Christine Poerschke4e40679d257e
diff --git a/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java b/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.javaindex 411b435f2de..61392c3a2c5 100644--- a/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java+++ b/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java@@ -249,7 +249,9 @@ public abstract class FilteredTermsEnum extends TermsEnum {case END:// we are supposed to end the enumreturn null;- // NO: we just fall through and iterate again+ case NO:+ // we just iterate again+ break;}}}diff --git a/lucene/queries/src/test/org/apache/lucene/queries/function/TestDocValuesFieldSources.java b/lucene/queries/src/test/org/apache/lucene/queries/function/TestDocValuesFieldSources.javaindex 479ac3cd121..f3946cb6f75 100644--- a/lucene/queries/src/test/org/apache/lucene/queries/function/TestDocValuesFieldSources.java+++ b/lucene/queries/src/test/org/apache/lucene/queries/function/TestDocValuesFieldSources.java@@ -92,6 +92,8 @@ public class TestDocValuesFieldSources extends LuceneTestCase {vals[i] = (long) random().nextInt((int) PackedInts.maxValue(bitsPerValue));f.setLongValue((Long) vals[i]);break;+ default:+ throw new AssertionError();}iw.addDocument(document);if (random().nextBoolean() && i % 10 == 9) {@@ -150,6 +152,8 @@ public class TestDocValuesFieldSources extends LuceneTestCase {case SORTED_NUMERIC:assertEquals(((Number) expected).longValue(), values.longVal(i));break;+ default:+ throw new AssertionError();}}}