Add nullability annotations to tests in module/spring-boot-rsocket-test

See gh-47263
This commit is contained in:
Moritz Halbritter
2025-10-13 12:14:00 +02:00
parent d0ae20fd94
commit 118bf10127
2 changed files with 7 additions and 2 deletions
@@ -33,3 +33,7 @@ dependencies {
testRuntimeOnly("ch.qos.logback:logback-classic")
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}
@@ -16,6 +16,7 @@
package org.springframework.boot.test.rsocket.server;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -37,10 +38,10 @@ import static org.assertj.core.api.Assertions.assertThat;
class LocalRSocketServerPortTests {
@Value("${local.rsocket.server.port}")
private String fromValue;
private @Nullable String fromValue;
@LocalRSocketServerPort
private String fromAnnotation;
private @Nullable String fromAnnotation;
@Test
void testLocalRSocketServerPortAnnotation() {