LUCENE-8167: fix three incompleteEnumSwitch warnings

This commit is contained in:
Christine Poerschke 2018-02-12 17:41:34 +00:00
parent 3019913c85
commit 4e40679d25
2 changed files with 7 additions and 1 deletions

View File

@ -249,7 +249,9 @@ public abstract class FilteredTermsEnum extends TermsEnum {
case END:
// we are supposed to end the enum
return null;
// NO: we just fall through and iterate again
case NO:
// we just iterate again
break;
}
}
}

View File

@ -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();
}
}
}