diff --git a/pom.xml b/pom.xml
index 901463f2..e5189600 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,7 +95,7 @@
0.0.6
- 3.14.0
+ 3.14.1
3.1.2
3.1.2
1.6.0
@@ -111,6 +111,9 @@
4.0.0-M13
3.4.5
3.3.0
+
+ 2.44.0
+ 0.12.12
0.0.43
3.6.0
@@ -193,9 +196,39 @@
${maven-compiler-plugin.version}
${java.version}
+ true
-parameters
+ -Xdoclint:none
+ -Werror
+ -XDcompilePolicy=simple
+ --should-stop=ifError=FLOW
+
+ -Xplugin:ErrorProne
+
+ -XepDisableAllChecks
+
+ -XepOpt:NullAway:JSpecifyMode=true
+
+ -Xep:NullAway:ERROR
+ -XepOpt:NullAway:OnlyNullMarked
+ -XepOpt:NullAway:TreatGeneratedAsUnannotated=true
+
+ -XepExcludedPaths:.*/src/test/java/.*
+
+
+
+ com.google.errorprone
+ error_prone_core
+ ${error-prone.version}
+
+
+ com.uber.nullaway
+ nullaway
+ ${nullaway.version}
+
+
diff --git a/spring-grpc-build-dependencies/pom.xml b/spring-grpc-build-dependencies/pom.xml
index 4fe00dde..668748ec 100644
--- a/spring-grpc-build-dependencies/pom.xml
+++ b/spring-grpc-build-dependencies/pom.xml
@@ -49,6 +49,7 @@
+ 1.0.0
7.0.1
7.0.0
1.16.0
@@ -94,6 +95,11 @@
pom
import
+
+ org.jspecify
+ jspecify
+ ${jspecify.version}
+
diff --git a/spring-grpc-core/pom.xml b/spring-grpc-core/pom.xml
index 9002fbf2..3a7811ac 100644
--- a/spring-grpc-core/pom.xml
+++ b/spring-grpc-core/pom.xml
@@ -23,6 +23,10 @@
spring-security-web
true
+
+ org.jspecify
+ jspecify
+
io.grpc
grpc-core
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/client/DefaultGrpcChannelFactory.java b/spring-grpc-core/src/main/java/org/springframework/grpc/client/DefaultGrpcChannelFactory.java
index dab19df2..c260f40b 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/client/DefaultGrpcChannelFactory.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/client/DefaultGrpcChannelFactory.java
@@ -22,9 +22,10 @@
import java.util.List;
import java.util.concurrent.TimeUnit;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.beans.factory.DisposableBean;
import org.springframework.core.log.LogAccessor;
-import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import io.grpc.ChannelCredentials;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/client/aot/ClientBeanRegistrationsAotProcessor.java b/spring-grpc-core/src/main/java/org/springframework/grpc/client/aot/ClientBeanRegistrationsAotProcessor.java
index 26ed0127..63867505 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/client/aot/ClientBeanRegistrationsAotProcessor.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/client/aot/ClientBeanRegistrationsAotProcessor.java
@@ -23,6 +23,8 @@
import java.util.HashSet;
import java.util.Set;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.aot.generate.GenerationContext;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.ReflectionHints;
@@ -36,7 +38,6 @@
import org.springframework.beans.factory.support.RegisteredBean;
import org.springframework.core.MethodParameter;
import org.springframework.grpc.client.GrpcClientFactory;
-import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
import org.springframework.util.ReflectionUtils;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/package-info.java b/spring-grpc-core/src/main/java/org/springframework/grpc/package-info.java
index 7aed8a38..640d32df 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/package-info.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/package-info.java
@@ -14,4 +14,10 @@
* limitations under the License.
*/
+/**
+ * Core module for Spring gRPC.
+ */
+@NullMarked
package org.springframework.grpc;
+
+import org.jspecify.annotations.NullMarked;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/server/DefaultGrpcServerFactory.java b/spring-grpc-core/src/main/java/org/springframework/grpc/server/DefaultGrpcServerFactory.java
index 8084ba17..6f80c988 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/server/DefaultGrpcServerFactory.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/server/DefaultGrpcServerFactory.java
@@ -27,10 +27,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jspecify.annotations.Nullable;
import org.springframework.grpc.internal.GrpcUtils;
import org.springframework.grpc.server.service.ServerInterceptorFilter;
-import org.springframework.lang.Nullable;
import io.grpc.Grpc;
import io.grpc.InsecureServerCredentials;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/server/security/SslContextPreAuthenticationExtractor.java b/spring-grpc-core/src/main/java/org/springframework/grpc/server/security/SslContextPreAuthenticationExtractor.java
index dbb19318..66a4fedd 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/server/security/SslContextPreAuthenticationExtractor.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/server/security/SslContextPreAuthenticationExtractor.java
@@ -23,7 +23,8 @@
import javax.net.ssl.SSLSession;
-import org.springframework.lang.Nullable;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;
import org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurer.java b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurer.java
index d09f4fb0..a1b9e868 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurer.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurer.java
@@ -20,12 +20,13 @@
import java.util.Arrays;
import java.util.List;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.grpc.internal.ApplicationContextBeanLookupUtils;
import org.springframework.grpc.server.GlobalServerInterceptor;
import org.springframework.grpc.server.GrpcServerFactory;
-import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import io.grpc.BindableService;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceDiscoverer.java b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceDiscoverer.java
index 9a3ba51e..d5347667 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceDiscoverer.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/DefaultGrpcServiceDiscoverer.java
@@ -18,9 +18,10 @@
import java.util.List;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.context.ApplicationContext;
import org.springframework.grpc.internal.ApplicationContextBeanLookupUtils;
-import org.springframework.lang.Nullable;
import io.grpc.BindableService;
import io.grpc.ServerServiceDefinition;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceConfigurer.java b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceConfigurer.java
index a31f1a5a..2da78d94 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceConfigurer.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceConfigurer.java
@@ -16,8 +16,9 @@
package org.springframework.grpc.server.service;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.grpc.server.GrpcServerFactory;
-import org.springframework.lang.Nullable;
import io.grpc.ServerServiceDefinition;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceInfo.java b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceInfo.java
index a21bbe85..a1bd405d 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceInfo.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceInfo.java
@@ -18,7 +18,8 @@
import java.util.List;
-import org.springframework.lang.Nullable;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.util.Assert;
import io.grpc.ServerInterceptor;
diff --git a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceSpec.java b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceSpec.java
index eb4af42f..a9b10972 100644
--- a/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceSpec.java
+++ b/spring-grpc-core/src/main/java/org/springframework/grpc/server/service/GrpcServiceSpec.java
@@ -16,7 +16,8 @@
package org.springframework.grpc.server.service;
-import org.springframework.lang.Nullable;
+import org.jspecify.annotations.Nullable;
+
import org.springframework.util.Assert;
import io.grpc.BindableService;
diff --git a/spring-grpc-core/src/test/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurerTests.java b/spring-grpc-core/src/test/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurerTests.java
index 05a66898..e01d9c1e 100644
--- a/spring-grpc-core/src/test/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurerTests.java
+++ b/spring-grpc-core/src/test/java/org/springframework/grpc/server/service/DefaultGrpcServiceConfigurerTests.java
@@ -29,6 +29,7 @@
import java.util.function.Consumer;
import org.assertj.core.api.InstanceOfAssertFactories;
+import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.mockito.MockedStatic;
@@ -44,7 +45,6 @@
import org.springframework.core.annotation.Order;
import org.springframework.grpc.server.GlobalServerInterceptor;
import org.springframework.grpc.server.lifecycle.GrpcServerLifecycle;
-import org.springframework.lang.Nullable;
import io.grpc.BindableService;
import io.grpc.ServerInterceptor;