Browse Source

Add nullability annotations to module/spring-boot-netty

See gh-46587
pull/46675/head
Moritz Halbritter 8 months ago
parent
commit
8e18a3fd7b
  1. 8
      module/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyProperties.java
  2. 3
      module/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/package-info.java

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

@ -16,6 +16,8 @@ @@ -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 { @@ -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;
}

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

@ -17,4 +17,7 @@ @@ -17,4 +17,7 @@
/**
* Auto-configuration for the Netty library.
*/
@NullMarked
package org.springframework.boot.netty.autoconfigure;
import org.jspecify.annotations.NullMarked;

Loading…
Cancel
Save