Skip to content

Commit 3353090

Browse files
committed
Add nullability annotations to tests in module/spring-boot-data-jdbc-test
See gh-47263
1 parent ad22bc0 commit 3353090

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ dependencies {
3838
testRuntimeOnly("com.h2database:h2")
3939
testRuntimeOnly("org.hsqldb:hsqldb")
4040
}
41+
42+
tasks.named("compileTestJava") {
43+
options.nullability.checking = "tests"
44+
}

module/spring-boot-data-jdbc-test/src/test/java/org/springframework/boot/data/jdbc/test/autoconfigure/ExampleEntity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
public class ExampleEntity {
2929

3030
@Id
31+
@SuppressWarnings("NullAway.Init")
3132
private Long id;
3233

3334
private final String name;

0 commit comments

Comments
 (0)