Add nullability annotations to tests in module/spring-boot-data-ldap-test
See gh-47263
This commit is contained in:
parent
2edd8f9d62
commit
99f8c4cd0d
|
@ -44,3 +44,11 @@ dependencies {
|
|||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
tasks.named("compileDockerTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ package org.springframework.boot.data.ldap.test.autoconfigure;
|
|||
|
||||
import javax.naming.Name;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.ldap.odm.annotations.Entry;
|
||||
import org.springframework.ldap.odm.annotations.Id;
|
||||
|
||||
|
@ -30,13 +32,13 @@ import org.springframework.ldap.odm.annotations.Id;
|
|||
public class ExampleEntry {
|
||||
|
||||
@Id
|
||||
private Name dn;
|
||||
private @Nullable Name dn;
|
||||
|
||||
public Name getDn() {
|
||||
public @Nullable Name getDn() {
|
||||
return this.dn;
|
||||
}
|
||||
|
||||
public void setDn(Name dn) {
|
||||
public void setDn(@Nullable Name dn) {
|
||||
this.dn = dn;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue