mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-war
See gh-47263
This commit is contained in:
@@ -35,3 +35,7 @@ dependencies {
|
||||
|
||||
testImplementation(project(":starter:spring-boot-starter-test"))
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
+2
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user