Browse Source

Add nullability annotations to module/spring-boot-data-neo4j

See gh-46587
pull/46602/head
Moritz Halbritter 5 months ago
parent
commit
fa6e9021ec
  1. 8
      module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java
  2. 3
      module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java

8
module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java

@ -16,6 +16,8 @@ @@ -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 { @@ -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;
}

3
module/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java

@ -17,4 +17,7 @@ @@ -17,4 +17,7 @@
/**
* Auto-configuration for Spring Data Neo4j.
*/
@NullMarked
package org.springframework.boot.data.neo4j.autoconfigure;
import org.jspecify.annotations.NullMarked;

Loading…
Cancel
Save