Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-war

See gh-47263
This commit is contained in:
Moritz Halbritter
2025-10-16 11:24:49 +02:00
parent 7a33978cca
commit 2d780f4e00
2 changed files with 6 additions and 1 deletions
@@ -35,3 +35,7 @@ dependencies {
testImplementation(project(":starter:spring-boot-starter-test"))
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}
@@ -16,6 +16,7 @@
package smoketest.war;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Value;
@@ -29,7 +30,7 @@ class WarApplicationResourceTests {
// gh-6371
@Value("${demo.string.value}")
private String demoStringValue;
private @Nullable String demoStringValue;
@Test
void contextLoads() {