Add nullability annotations to tests in module/spring-boot-hazelcast
See gh-47263
This commit is contained in:
parent
bf075ec89c
commit
0634c11eee
|
@ -54,3 +54,11 @@ dependencies {
|
||||||
testRuntimeOnly("com.h2database:h2")
|
testRuntimeOnly("com.h2database:h2")
|
||||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.named("compileTestJava") {
|
||||||
|
options.nullability.checking = "tests"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("compileDockerTestJava") {
|
||||||
|
options.nullability.checking = "tests"
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ import com.hazelcast.map.EntryProcessor;
|
||||||
import com.hazelcast.map.IMap;
|
import com.hazelcast.map.IMap;
|
||||||
import com.hazelcast.spring.context.SpringAware;
|
import com.hazelcast.spring.context.SpringAware;
|
||||||
import com.hazelcast.spring.context.SpringManagedContext;
|
import com.hazelcast.spring.context.SpringManagedContext;
|
||||||
|
import org.jspecify.annotations.Nullable;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
@ -319,7 +320,7 @@ class HazelcastAutoConfigurationServerTests {
|
||||||
private Environment environment;
|
private Environment environment;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String process(Map.Entry<String, V> entry) {
|
public @Nullable String process(Map.Entry<String, V> entry) {
|
||||||
return this.environment.getProperty(entry.getKey());
|
return this.environment.getProperty(entry.getKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue