Browse Source

Suppress NullAway checks in tests for Maven plugin

See gh-47263
pull/47665/head
Moritz Halbritter 2 months ago
parent
commit
e2433fda5f
  1. 2
      build-plugin/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/CommandLineBuilderTests.java

2
build-plugin/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/CommandLineBuilderTests.java

@ -49,6 +49,7 @@ class CommandLineBuilderTests { @@ -49,6 +49,7 @@ class CommandLineBuilderTests {
public static final String CLASS_NAME = ClassWithMainMethod.class.getName();
@Test
@SuppressWarnings("NullAway") // Maven can't deal with @Nullable arrays / varargs
void buildWithNullJvmArgumentsIsIgnored() {
assertThat(CommandLineBuilder.forMainClass(CLASS_NAME).withJvmArguments((String[]) null).build())
.containsExactly(CLASS_NAME);
@ -80,6 +81,7 @@ class CommandLineBuilderTests { @@ -80,6 +81,7 @@ class CommandLineBuilderTests {
}
@Test
@SuppressWarnings("NullAway") // Maven can't deal with @Nullable arrays / varargs
void buildWithNullArgumentsIsIgnored() {
assertThat(CommandLineBuilder.forMainClass(CLASS_NAME).withArguments((String[]) null).build())
.containsExactly(CLASS_NAME);

Loading…
Cancel
Save