diff --git a/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java b/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java index d30301a451e..acd9b494f8e 100644 --- a/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java +++ b/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java @@ -16,6 +16,8 @@ package org.springframework.boot.data.neo4j.autoconfigure; +import org.jspecify.annotations.Nullable; + import org.springframework.boot.context.properties.ConfigurationProperties; /** @@ -30,13 +32,13 @@ public class Neo4jDataProperties { /** * Database name to use. By default, the server decides the default database to use. */ - private String database; + private @Nullable String database; - public String getDatabase() { + public @Nullable String getDatabase() { return this.database; } - public void setDatabase(String database) { + public void setDatabase(@Nullable String database) { this.database = database; } diff --git a/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java b/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java index ba3a304a193..bdc70460774 100644 --- a/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java +++ b/module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java @@ -17,4 +17,7 @@ /** * Auto-configuration for Spring Data Neo4j. */ +@NullMarked package org.springframework.boot.data.neo4j.autoconfigure; + +import org.jspecify.annotations.NullMarked;