Add nullability annotations to module/spring-boot-netty

See gh-46587
This commit is contained in:
Moritz Halbritter
2025-08-05 08:55:57 +02:00
parent 6fb60bc3f5
commit 8e18a3fd7b
2 changed files with 8 additions and 3 deletions
@@ -16,6 +16,8 @@
package org.springframework.boot.netty.autoconfigure;
import org.jspecify.annotations.Nullable;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
@@ -34,13 +36,13 @@ public class NettyProperties {
* 'ResourceLeakDetector.setLevel' or the 'io.netty.leakDetection.level' system
* property, default to 'simple'.
*/
private LeakDetection leakDetection;
private @Nullable LeakDetection leakDetection;
public LeakDetection getLeakDetection() {
public @Nullable LeakDetection getLeakDetection() {
return this.leakDetection;
}
public void setLeakDetection(LeakDetection leakDetection) {
public void setLeakDetection(@Nullable LeakDetection leakDetection) {
this.leakDetection = leakDetection;
}
@@ -17,4 +17,7 @@
/**
* Auto-configuration for the Netty library.
*/
@NullMarked
package org.springframework.boot.netty.autoconfigure;
import org.jspecify.annotations.NullMarked;