mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-01 23:09:01 +00:00
Add nullability annotations to tests in module/spring-boot-data-redis-test
See gh-47263
This commit is contained in:
@@ -48,3 +48,11 @@ dependencies {
|
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
tasks.named("compileDockerTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
+8
-6
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.boot.data.redis.test.autoconfigure;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.redis.core.RedisHash;
|
||||
|
||||
@@ -28,23 +30,23 @@ import org.springframework.data.redis.core.RedisHash;
|
||||
public class PersonHash {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
private @Nullable String id;
|
||||
|
||||
private String description;
|
||||
private @Nullable String description;
|
||||
|
||||
public String getId() {
|
||||
public @Nullable String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
public void setId(@Nullable String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
public @Nullable String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
public void setDescription(@Nullable String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user