LUCENE-10422: Make errorprone happy

This commit is contained in:
Alan Woodward 2022-03-22 09:18:27 +00:00
parent fa61953afd
commit 42bf77229e
1 changed files with 2 additions and 2 deletions

View File

@ -70,10 +70,10 @@ public class TestMonitorReadonly extends MonitorTestBase {
MonitorQuerySerializer.fromParser(MonitorTestBase::parse),
true);
try (Monitor monitor = new Monitor(ANALYZER, config)) {
TermQuery query = new TermQuery(new Term(FIELD, "test"));
assertThrows(
UnsupportedOperationException.class,
() -> {
TermQuery query = new TermQuery(new Term(FIELD, "test"));
monitor.register(
new MonitorQuery("query1", query, query.toString(), Collections.emptyMap()));
});
@ -156,10 +156,10 @@ public class TestMonitorReadonly extends MonitorTestBase {
assertEquals(1, matches.getMatchCount());
assertNotNull(matches.matches("query1"));
TermQuery query = new TermQuery(new Term(FIELD, "test"));
assertThrows(
UnsupportedOperationException.class,
() -> {
TermQuery query = new TermQuery(new Term(FIELD, "test"));
readMonitor2.register(
new MonitorQuery("query1", query, query.toString(), Collections.emptyMap()));
});