Skip to content

Commit aa9d5ec

Browse files
committed
Add nullability annotations to module/spring-boot-session-data-redis
See gh-46587
1 parent 960ce20 commit aa9d5ec

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

module/spring-boot-session-data-redis/src/main/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionProperties.java

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

1717
package org.springframework.boot.session.data.redis.autoconfigure;
1818

19+
import org.jspecify.annotations.Nullable;
20+
1921
import org.springframework.boot.context.properties.ConfigurationProperties;
2022
import org.springframework.session.FlushMode;
2123
import org.springframework.session.SaveMode;
@@ -57,7 +59,7 @@ public class RedisSessionProperties {
5759
* repository-type is set to indexed. Not supported with a reactive session
5860
* repository.
5961
*/
60-
private String cleanupCron;
62+
private @Nullable String cleanupCron;
6163

6264
/**
6365
* Type of Redis session repository to configure.
@@ -88,11 +90,11 @@ public void setSaveMode(SaveMode saveMode) {
8890
this.saveMode = saveMode;
8991
}
9092

91-
public String getCleanupCron() {
93+
public @Nullable String getCleanupCron() {
9294
return this.cleanupCron;
9395
}
9496

95-
public void setCleanupCron(String cleanupCron) {
97+
public void setCleanupCron(@Nullable String cleanupCron) {
9698
this.cleanupCron = cleanupCron;
9799
}
98100

module/spring-boot-session-data-redis/src/main/java/org/springframework/boot/session/data/redis/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 Session Data Redis.
1919
*/
20+
@NullMarked
2021
package org.springframework.boot.session.data.redis.autoconfigure;
22+
23+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)