From 1790d7b540597e57b287b79d54bacf1a0ffbe165 Mon Sep 17 00:00:00 2001 From: Divyansh Vijayvergia Date: Fri, 24 Apr 2026 12:22:03 +0000 Subject: [PATCH] Bump google-java-format to 1.27.0 and fmt CI JDK to 17 Follow-up to #777. Pinning GJF to 1.22.0 did not fix the JDK 25 generator crash because 1.22.0 still calls the old Queue-returning Log$DeferredDiagnosticHandler.getDiagnostics() signature that JDK 23+ removed. GJF 1.27.0 is the first release with the DeferredDiagnosticHandler compatibility fix, but it requires JRE 17+ to run. Bump the fmt CI job's java-version from 11 to 17 to match. The unit-tests matrix (JDK 8/11/17/20), release-build-check (JDK 8) and check-lock (JDK 11) are unaffected - none invoke spotless. Compiled bytecode target remains Java 8. Verified locally: - JDK 17: spotless:check passes - JDK 11: UnsupportedClassVersionError (intentional floor, class file v61.0) - JDK 25: scripts/mvn-spotless-apply.sh returns BUILD SUCCESS Co-authored-by: Isaac --- .github/workflows/push.yml | 3 ++- pom.xml | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 990d885d5..3ecb424a3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -30,7 +30,8 @@ jobs: - name: Setup build environment uses: ./.github/actions/setup-build-environment with: - java-version: 11 + # google-java-format 1.27.0 (pinned in pom.xml) requires JRE 17+ to run. + java-version: 17 - name: Check formatting run: mvn --errors spotless:check diff --git a/pom.xml b/pom.xml index eb82c70b8..bd663de55 100644 --- a/pom.xml +++ b/pom.xml @@ -84,11 +84,11 @@ - - 1.22.0 + + 1.27.0