Skip to content

Commit 782406f

Browse files
committed
Use a statement lambda
which silences a warning from IntelliJ
1 parent 10fc6ec commit 782406f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/CefProcessorTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -983,19 +983,19 @@ public void toIP_validIPv6Address() {
983983

984984
public void toIP_invalidIPAddress() {
985985
CefParser parser = new CefParser(ZoneId.of("UTC"), true);
986-
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { parser.toIP("invalid_ip"); });
986+
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> parser.toIP("invalid_ip"));
987987
assertEquals("Invalid IP address format", exception.getMessage());
988988
}
989989

990990
public void toIP_emptyString() {
991991
CefParser parser = new CefParser(ZoneId.of("UTC"), true);
992-
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { parser.toIP(""); });
992+
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> parser.toIP(""));
993993
assertEquals("Invalid IP address format", exception.getMessage());
994994
}
995995

996996
public void toIP_nullString() {
997997
CefParser parser = new CefParser(ZoneId.of("UTC"), true);
998-
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { parser.toIP(null); });
998+
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> parser.toIP(null));
999999
assertEquals("Invalid IP address format", exception.getMessage());
10001000
}
10011001
}

0 commit comments

Comments
 (0)