mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-29 13:39:16 +00:00
Add nullability annotations to tests in module/spring-boot-hazelcast
See gh-47263
This commit is contained in:
@@ -54,3 +54,11 @@ dependencies {
|
||||
testRuntimeOnly("com.h2database:h2")
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
tasks.named("compileDockerTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
+2
-1
@@ -31,6 +31,7 @@ import com.hazelcast.map.EntryProcessor;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.hazelcast.spring.context.SpringAware;
|
||||
import com.hazelcast.spring.context.SpringManagedContext;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -319,7 +320,7 @@ class HazelcastAutoConfigurationServerTests {
|
||||
private Environment environment;
|
||||
|
||||
@Override
|
||||
public String process(Map.Entry<String, V> entry) {
|
||||
public @Nullable String process(Map.Entry<String, V> entry) {
|
||||
return this.environment.getProperty(entry.getKey());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user