Skip to content

chore(java): Update Spotless and Checkstyle to allow building with JDK25#3476

Merged
chaokunyang merged 1 commit intoapache:mainfrom
stevenschlansker:checkstyle-jdk25
Mar 14, 2026
Merged

chore(java): Update Spotless and Checkstyle to allow building with JDK25#3476
chaokunyang merged 1 commit intoapache:mainfrom
stevenschlansker:checkstyle-jdk25

Conversation

@stevenschlansker
Copy link
Contributor

Why?

Spotless fails when run in JDK25:

Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.41.1:apply failed: An API incompatibility was encountered while executing com.diffplug.spotless:spotless-maven-plugin:2.41.1:apply: java.lang.NoSuchMethodError: 'java.util.Queue com.sun.tools.javac.util.Log$DeferredDiagnosticHandler.getDiagnostics()'

What does this PR do?

Updates build plugins to newer versions with JDK25 support

@stevenschlansker stevenschlansker changed the title Update Spotless to allow building with JDK25 chore(java): Update Spotless to allow building with JDK25 Mar 13, 2026
<configuration>
<configLocation>${fory.java.rootdir}/checkstyle.xml</configLocation>
<suppressionsLocation>${fory.java.rootdir}/checkstyle-suppressions.xml</suppressionsLocation>
<encoding>UTF-8</encoding>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Parameter 'encoding' is unknown for plugin 'maven-checkstyle-plugin:3.6.0:check (default-cli)'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the default is source encoding, so this should be okay I think?)

value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cannot initialize module TreeWalker - cannot initialize module JavadocMethod - Property 'scope' does not exist, please check the documentation

@stevenschlansker stevenschlansker changed the title chore(java): Update Spotless to allow building with JDK25 chore(java): Update Spotless and Checkstyle to allow building with JDK25 Mar 13, 2026
Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chaokunyang chaokunyang merged commit 8df6bc3 into apache:main Mar 14, 2026
59 checks passed
@stevenschlansker stevenschlansker deleted the checkstyle-jdk25 branch March 14, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants