SOLR-18296: Upgrade google-java-format to 1.35.0 (JDK 24/25 fix)#4578
Open
serhiy-bzhezytskyy wants to merge 3 commits into
Open
SOLR-18296: Upgrade google-java-format to 1.35.0 (JDK 24/25 fix)#4578serhiy-bzhezytskyy wants to merge 3 commits into
serhiy-bzhezytskyy wants to merge 3 commits into
Conversation
google-java-format 1.18.1 calls a javac internal (Log$DeferredDiagnosticHandler.getDiagnostics()) whose signature changed in JDK 24, so tidy/spotlessApply throws NoSuchMethodError on JDK 24+. 1.34.0+ supports the newer JDKs; this bumps to 1.35.0. Java baseline unchanged (21).
Pure mechanical reformatting from ./gradlew tidy with the upgraded formatter. No logic changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/SOLR-18296
Description
Bumps google-java-format from 1.18.1 to 1.35.0. Java baseline unchanged (JDK 21);
this only affects the spotless code formatter.
google-java-format 1.18.1 calls a javac internal,
Log$DeferredDiagnosticHandler.getDiagnostics(), whose signature changed inJDK 24, so
gradlew tidy/spotlessApplythrowsNoSuchMethodErroron JDK 24+.1.34.0+ supports the newer JDKs; 1.35.0 is the current release.
This supersedes #4573, restructured per review feedback.
Commits
gradle/libs.versions.tomlbump +changelog entry.
gradlew tidyunder the new version. Pure mechanical formatting, no logicchanges. Isolated in its own commit and added to
.git-blame-ignore-revs..git-blame-ignore-revs.The
.git-blame-ignore-revsentry references the reformat commit's SHA, so itrelies on that commit being preserved rather than squashed.
On splitting bump vs. reformat into separate PRs
I looked at doing the formatting as a fully separate PR, but for a pure
formatter version bump the two halves can't stand alone — each leaves
spotlessJavaCheckred:same
NoSuchMethodErrorthis PR fixes.Only the two together are green. So they're kept in one PR, with the reformat
isolated into its own commit + blame-ignore as suggested.
Testing
gradlew spotlessJavaCheckpasses on Eclipse Temurin 21 and JDK 25.AI assistance disclosure
Per AGENTS.md / how-to-contribute.adoc: prepared with the assistance of an AI
coding agent and reviewed by me for correctness, scope, and alignment with
Solr's build conventions.