diff --git a/gradle/spring-module.gradle b/gradle/spring-module.gradle index c0c9eea1551b..af63f0ad593d 100644 --- a/gradle/spring-module.gradle +++ b/gradle/spring-module.gradle @@ -117,10 +117,8 @@ tasks.withType(JavaCompile).configureEach { options.errorprone { disableAllChecks = true option("NullAway:CustomContractAnnotations", "org.springframework.lang.Contract") - option("NullAway:AnnotatedPackages", "org.springframework") - option("NullAway:UnannotatedSubPackages", "org.springframework.instrument,org.springframework.context.index," + - "org.springframework.asm,org.springframework.cglib,org.springframework.objenesis," + - "org.springframework.javapoet,org.springframework.aot.nativex.substitution,org.springframework.aot.nativex.feature") + // TODO Replace by proper flag when supported, see https://github.com/uber/NullAway/issues/574 + option("NullAway:AnnotatedPackages", "") } } tasks.compileJava { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java index 9977331aa4cb..b282705390bf 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java @@ -1,7 +1,4 @@ /** * Support for class instrumentation on GlassFish. */ -@NullMarked package org.springframework.instrument.classloading.glassfish; - -import org.jspecify.annotations.NullMarked; diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java index b758412f73ab..e746ce5e7f5b 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java @@ -1,7 +1,4 @@ /** * Support for class instrumentation on JBoss AS 6 and 7. */ -@NullMarked package org.springframework.instrument.classloading.jboss; - -import org.jspecify.annotations.NullMarked; diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java index 73711875a1d3..c1b7cf3d2cbd 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java @@ -2,7 +2,4 @@ * Support package for load time weaving based on class loaders, * as required by JPA providers (but not JPA-specific). */ -@NullMarked package org.springframework.instrument.classloading; - -import org.jspecify.annotations.NullMarked; diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java index 8f2e06a38dc2..11c70a1c6c5d 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java @@ -1,7 +1,4 @@ /** * Support for class instrumentation on Tomcat. */ -@NullMarked package org.springframework.instrument.classloading.tomcat; - -import org.jspecify.annotations.NullMarked; diff --git a/spring-core/src/main/java/org/springframework/aot/nativex/feature/package-info.java b/spring-core/src/main/java/org/springframework/aot/nativex/feature/package-info.java index 87aa20315f18..11e2830acb7d 100644 --- a/spring-core/src/main/java/org/springframework/aot/nativex/feature/package-info.java +++ b/spring-core/src/main/java/org/springframework/aot/nativex/feature/package-info.java @@ -1,7 +1,4 @@ /** * GraalVM native image features, not part of Spring Framework public API. */ -@NullMarked package org.springframework.aot.nativex.feature; - -import org.jspecify.annotations.NullMarked; diff --git a/spring-core/src/main/java/org/springframework/aot/nativex/substitution/package-info.java b/spring-core/src/main/java/org/springframework/aot/nativex/substitution/package-info.java index d11c6ea3bf24..e095edccc660 100644 --- a/spring-core/src/main/java/org/springframework/aot/nativex/substitution/package-info.java +++ b/spring-core/src/main/java/org/springframework/aot/nativex/substitution/package-info.java @@ -1,7 +1,4 @@ /** * GraalVM native image substitutions, not part of Spring Framework public API. */ -@NullMarked package org.springframework.aot.nativex.substitution; - -import org.jspecify.annotations.NullMarked; diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index adcc7e3f1eee..6162aeca7baf 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -37,10 +37,12 @@ + +