Browse Source

Add nullability annotations to integration-test/spring-boot-configuration-processor-integration-tests

See gh-46587
pull/46818/head
Moritz Halbritter 4 months ago
parent
commit
a70a8b2697
  1. 7
      integration-test/spring-boot-configuration-processor-integration-tests/src/main/java/sample/AnnotatedSample.java
  2. 3
      integration-test/spring-boot-configuration-processor-integration-tests/src/main/java/sample/package-info.java

7
integration-test/spring-boot-configuration-processor-integration-tests/src/main/java/sample/AnnotatedSample.java

@ -17,6 +17,7 @@
package sample; package sample;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import org.jspecify.annotations.Nullable;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
@ -32,14 +33,14 @@ public class AnnotatedSample {
/** /**
* A valid name. * A valid name.
*/ */
private String name; private @Nullable String name;
@Valid @Valid
public String getName() { public @Nullable String getName() {
return this.name; return this.name;
} }
public void setName(String name) { public void setName(@Nullable String name) {
this.name = name; this.name = name;
} }

3
integration-test/spring-boot-configuration-processor-integration-tests/src/main/java/sample/package-info.java

@ -17,4 +17,7 @@
/** /**
* Sample used for testing. * Sample used for testing.
*/ */
@NullMarked
package sample; package sample;
import org.jspecify.annotations.NullMarked;

Loading…
Cancel
Save