Skip to content

Commit a70a8b2

Browse files
committed
Add nullability annotations to integration-test/spring-boot-configuration-processor-integration-tests
See gh-46587
1 parent 968b878 commit a70a8b2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package sample;
1818

1919
import jakarta.validation.Valid;
20+
import org.jspecify.annotations.Nullable;
2021

2122
import org.springframework.boot.context.properties.ConfigurationProperties;
2223

@@ -32,14 +33,14 @@ public class AnnotatedSample {
3233
/**
3334
* A valid name.
3435
*/
35-
private String name;
36+
private @Nullable String name;
3637

3738
@Valid
38-
public String getName() {
39+
public @Nullable String getName() {
3940
return this.name;
4041
}
4142

42-
public void setName(String name) {
43+
public void setName(@Nullable String name) {
4344
this.name = name;
4445
}
4546

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717
/**
1818
* Sample used for testing.
1919
*/
20+
@NullMarked
2021
package sample;
22+
23+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)