Skip to content

Commit 55a97aa

Browse files
committed
Add nullability annotations to tests in module/spring-boot-data-r2dbc-test
See gh-47263
1 parent 06dd6ae commit 55a97aa

File tree

2 files changed

+7
-1
lines changed
  • module/spring-boot-data-r2dbc-test

2 files changed

+7
-1
lines changed

module/spring-boot-data-r2dbc-test/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ dependencies {
3737

3838
testRuntimeOnly("ch.qos.logback:logback-classic")
3939
}
40+
41+
tasks.named("compileTestJava") {
42+
options.nullability.checking = "tests"
43+
}

module/spring-boot-data-r2dbc-test/src/test/java/org/springframework/boot/data/r2dbc/test/autoconfigure/Example.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.boot.data.r2dbc.test.autoconfigure;
1818

19+
import org.jspecify.annotations.Nullable;
20+
1921
import org.springframework.data.annotation.Id;
2022
import org.springframework.data.relational.core.mapping.Table;
2123

@@ -28,6 +30,6 @@
2830
public class Example {
2931

3032
@Id
31-
String id;
33+
@Nullable String id;
3234

3335
}

0 commit comments

Comments
 (0)