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

See gh-46587
This commit is contained in:
Moritz Halbritter
2025-07-30 11:34:07 +02:00
parent e66e9ab557
commit 864fa90fcc
2 changed files with 14 additions and 9 deletions
@@ -16,6 +16,8 @@
package org.springframework.boot.data.couchbase.autoconfigure;
import org.jspecify.annotations.Nullable;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
@@ -36,17 +38,17 @@ public class CouchbaseDataProperties {
/**
* Name of the bucket to connect to.
*/
private String bucketName;
private @Nullable String bucketName;
/**
* Name of the scope used for all collection access.
*/
private String scopeName;
private @Nullable String scopeName;
/**
* Fully qualified name of the FieldNamingStrategy to use.
*/
private Class<?> fieldNamingStrategy;
private @Nullable Class<?> fieldNamingStrategy;
/**
* Name of the field that stores the type information for complex types when using
@@ -62,27 +64,27 @@ public class CouchbaseDataProperties {
this.autoIndex = autoIndex;
}
public String getBucketName() {
public @Nullable String getBucketName() {
return this.bucketName;
}
public void setBucketName(String bucketName) {
public void setBucketName(@Nullable String bucketName) {
this.bucketName = bucketName;
}
public String getScopeName() {
public @Nullable String getScopeName() {
return this.scopeName;
}
public void setScopeName(String scopeName) {
public void setScopeName(@Nullable String scopeName) {
this.scopeName = scopeName;
}
public Class<?> getFieldNamingStrategy() {
public @Nullable Class<?> getFieldNamingStrategy() {
return this.fieldNamingStrategy;
}
public void setFieldNamingStrategy(Class<?> fieldNamingStrategy) {
public void setFieldNamingStrategy(@Nullable Class<?> fieldNamingStrategy) {
this.fieldNamingStrategy = fieldNamingStrategy;
}
@@ -17,4 +17,7 @@
/**
* Auto-configuration for Spring Data Couchbase.
*/
@NullMarked
package org.springframework.boot.data.couchbase.autoconfigure;
import org.jspecify.annotations.NullMarked;