From 06dd6aec3c0e2857d396ace5c840acee274668b4 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Mon, 6 Oct 2025 11:55:04 +0200 Subject: [PATCH] Add nullability annotations to tests in module/spring-boot-data-neo4j-test See gh-47263 --- module/spring-boot-data-neo4j-test/build.gradle | 8 ++++++++ .../boot/data/neo4j/test/autoconfigure/ExampleGraph.java | 1 + 2 files changed, 9 insertions(+) diff --git a/module/spring-boot-data-neo4j-test/build.gradle b/module/spring-boot-data-neo4j-test/build.gradle index 75e75edb0be..5c7dd7445a4 100644 --- a/module/spring-boot-data-neo4j-test/build.gradle +++ b/module/spring-boot-data-neo4j-test/build.gradle @@ -45,3 +45,11 @@ dependencies { testRuntimeOnly("ch.qos.logback:logback-classic") } + +tasks.named("compileTestJava") { + options.nullability.checking = "tests" +} + +tasks.named("compileDockerTestJava") { + options.nullability.checking = "tests" +} diff --git a/module/spring-boot-data-neo4j-test/src/dockerTest/java/org/springframework/boot/data/neo4j/test/autoconfigure/ExampleGraph.java b/module/spring-boot-data-neo4j-test/src/dockerTest/java/org/springframework/boot/data/neo4j/test/autoconfigure/ExampleGraph.java index 0f946bb52c3..20d2f61f4d2 100644 --- a/module/spring-boot-data-neo4j-test/src/dockerTest/java/org/springframework/boot/data/neo4j/test/autoconfigure/ExampleGraph.java +++ b/module/spring-boot-data-neo4j-test/src/dockerTest/java/org/springframework/boot/data/neo4j/test/autoconfigure/ExampleGraph.java @@ -31,6 +31,7 @@ public class ExampleGraph { @Id @GeneratedValue + @SuppressWarnings("NullAway.Init") private Long id; @Property