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

See gh-47263
This commit is contained in:
Moritz Halbritter 2025-10-06 11:56:21 +02:00
parent 06dd6aec3c
commit 55a97aa7ad
2 changed files with 7 additions and 1 deletions

View File

@ -37,3 +37,7 @@ dependencies {
testRuntimeOnly("ch.qos.logback:logback-classic") testRuntimeOnly("ch.qos.logback:logback-classic")
} }
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}

View File

@ -16,6 +16,8 @@
package org.springframework.boot.data.r2dbc.test.autoconfigure; package org.springframework.boot.data.r2dbc.test.autoconfigure;
import org.jspecify.annotations.Nullable;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table; import org.springframework.data.relational.core.mapping.Table;
@ -28,6 +30,6 @@ import org.springframework.data.relational.core.mapping.Table;
public class Example { public class Example {
@Id @Id
String id; @Nullable String id;
} }