From aba6318488a6f8bfdb99017b503d70d159bd98b6 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 15 Oct 2025 14:03:13 -0400 Subject: [PATCH] Configures maven-compiler-plugin for jspecify (#562) * Configures maven-compiler-plugin for jspecify Fixes gh-561 * Adds exports/open to jvm.config Fixes gh-561 * Moves jspecify behind profile Activate with java25 and jspecify.enabled=true See gh-561 * Updates ant to ignore securitymanager exceptions See gh-561 * Adds JSpecifyMode=true Fixes some javadoc warnings See gh-561 --- .mvn/jvm.config | 12 ++++++++- pom.xml | 70 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 67 insertions(+), 15 deletions(-) diff --git a/.mvn/jvm.config b/.mvn/jvm.config index 0e7dabef..761912e4 100644 --- a/.mvn/jvm.config +++ b/.mvn/jvm.config @@ -1 +1,11 @@ --Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom \ No newline at end of file +-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \ No newline at end of file diff --git a/pom.xml b/pom.xml index 13884bab..0380fa6e 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,8 @@ ${project.version} 2.5.13 9.4.9.0 + 2.42.0 + 0.12.10 jacoco @@ -917,36 +919,76 @@ - java8 + java17 - [1.8,) + [17,) maven-javadoc-plugin - -Xdoclint:none + none - java11 + jspecify - [1.11,) + [25,) + + jspecify.enabled + true + - - - maven-javadoc-plugin - - - 8 - - - + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${maven.compiler.source} + ${maven.compiler.target} + ${java.version} + + -parameters + + -XDcompilePolicy=simple + --should-stop=ifError=FLOW + + -Xplugin:ErrorProne + + -XepOpt:NullAway:JSpecifyMode=true + + -Xep:NullAway:ERROR + -XepOpt:NullAway:OnlyNullMarked + + -XepOpt:NullAway:CustomContractAnnotations=org.springframework.lang.Contract + -XepOpt:NullAway:SuppressionNameAliases=DataFlowIssue + + -XepExcludedPaths:.*/src/test/java/.* + + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + com.uber.nullaway + nullaway + ${nullaway.version} + + + + + +