Skip to content

Commit 864fa90

Browse files
committed
Add nullability annotations to module/spring-boot-data-couchbase
See gh-46587
1 parent e66e9ab commit 864fa90

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

module/spring-boot-data-couchbase/src/main/java/org/springframework/boot/data/couchbase/autoconfigure/CouchbaseDataProperties.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.boot.data.couchbase.autoconfigure;
1818

19+
import org.jspecify.annotations.Nullable;
20+
1921
import org.springframework.boot.context.properties.ConfigurationProperties;
2022

2123
/**
@@ -36,17 +38,17 @@ public class CouchbaseDataProperties {
3638
/**
3739
* Name of the bucket to connect to.
3840
*/
39-
private String bucketName;
41+
private @Nullable String bucketName;
4042

4143
/**
4244
* Name of the scope used for all collection access.
4345
*/
44-
private String scopeName;
46+
private @Nullable String scopeName;
4547

4648
/**
4749
* Fully qualified name of the FieldNamingStrategy to use.
4850
*/
49-
private Class<?> fieldNamingStrategy;
51+
private @Nullable Class<?> fieldNamingStrategy;
5052

5153
/**
5254
* Name of the field that stores the type information for complex types when using
@@ -62,27 +64,27 @@ public void setAutoIndex(boolean autoIndex) {
6264
this.autoIndex = autoIndex;
6365
}
6466

65-
public String getBucketName() {
67+
public @Nullable String getBucketName() {
6668
return this.bucketName;
6769
}
6870

69-
public void setBucketName(String bucketName) {
71+
public void setBucketName(@Nullable String bucketName) {
7072
this.bucketName = bucketName;
7173
}
7274

73-
public String getScopeName() {
75+
public @Nullable String getScopeName() {
7476
return this.scopeName;
7577
}
7678

77-
public void setScopeName(String scopeName) {
79+
public void setScopeName(@Nullable String scopeName) {
7880
this.scopeName = scopeName;
7981
}
8082

81-
public Class<?> getFieldNamingStrategy() {
83+
public @Nullable Class<?> getFieldNamingStrategy() {
8284
return this.fieldNamingStrategy;
8385
}
8486

85-
public void setFieldNamingStrategy(Class<?> fieldNamingStrategy) {
87+
public void setFieldNamingStrategy(@Nullable Class<?> fieldNamingStrategy) {
8688
this.fieldNamingStrategy = fieldNamingStrategy;
8789
}
8890

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717
/**
1818
* Auto-configuration for Spring Data Couchbase.
1919
*/
20+
@NullMarked
2021
package org.springframework.boot.data.couchbase.autoconfigure;
22+
23+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)