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

See gh-47263
This commit is contained in:
Moritz Halbritter 2025-10-16 10:05:18 +02:00
parent 34ca46740d
commit ecd3566d5f
3 changed files with 6 additions and 0 deletions

View File

@ -25,3 +25,7 @@ dependencies {
testImplementation(project(":starter:spring-boot-starter-test"))
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}

View File

@ -80,6 +80,7 @@ class SampleWebSocketsApplicationTests {
static class ClientConfiguration implements CommandLineRunner {
@Value("${websocket.uri}")
@SuppressWarnings("NullAway.Init")
private String webSocketUri;
private final CountDownLatch latch = new CountDownLatch(1);

View File

@ -95,6 +95,7 @@ class CustomContainerWebSocketsApplicationTests {
static class ClientConfiguration implements CommandLineRunner {
@Value("${websocket.uri}")
@SuppressWarnings("NullAway.Init")
private String webSocketUri;
private final CountDownLatch latch = new CountDownLatch(1);