Skip to content

Commit 8e18a3f

Browse files
committed
Add nullability annotations to module/spring-boot-netty
See gh-46587
1 parent 6fb60bc commit 8e18a3f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

module/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyProperties.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.boot.netty.autoconfigure;
1818

19+
import org.jspecify.annotations.Nullable;
20+
1921
import org.springframework.boot.context.properties.ConfigurationProperties;
2022

2123
/**
@@ -34,13 +36,13 @@ public class NettyProperties {
3436
* 'ResourceLeakDetector.setLevel' or the 'io.netty.leakDetection.level' system
3537
* property, default to 'simple'.
3638
*/
37-
private LeakDetection leakDetection;
39+
private @Nullable LeakDetection leakDetection;
3840

39-
public LeakDetection getLeakDetection() {
41+
public @Nullable LeakDetection getLeakDetection() {
4042
return this.leakDetection;
4143
}
4244

43-
public void setLeakDetection(LeakDetection leakDetection) {
45+
public void setLeakDetection(@Nullable LeakDetection leakDetection) {
4446
this.leakDetection = leakDetection;
4547
}
4648

module/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/package-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717
/**
1818
* Auto-configuration for the Netty library.
1919
*/
20+
@NullMarked
2021
package org.springframework.boot.netty.autoconfigure;
22+
23+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)