Add nullability annotations to tests in module/spring-boot-hazelcast

See gh-47263
This commit is contained in:
Moritz Halbritter 2025-09-26 12:29:30 +02:00
parent bf075ec89c
commit 0634c11eee
2 changed files with 10 additions and 1 deletions

View File

@ -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"
}

View File

@ -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());
}