Skip to content

fix(java): update palantir-java-format to 2.80.0 to fix JDK 25 EA compatibility#10002

Closed
devin-ai-integration[bot] wants to merge 5 commits intomainfrom
devin/1761068730-fix-java-palantir-format-jdk25
Closed

fix(java): update palantir-java-format to 2.80.0 to fix JDK 25 EA compatibility#10002
devin-ai-integration[bot] wants to merge 5 commits intomainfrom
devin/1761068730-fix-java-palantir-format-jdk25

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Oct 21, 2025

Description

Linear ticket: N/A (customer issue reported via Slack)

Link to Devin run: https://app.devin.ai/sessions/bc7b796ece494de58f3ff09a4b925bea
Requested by: tanmay.singh@buildwithfern.com (@tstanmay13)

Fixes a NoSuchMethodError that customers encounter when building generated Java SDKs with JDK 25 EA. The error occurs because palantir-java-format 2.46.0 is incompatible with JDK 25's internal compiler API changes:

java.lang.NoSuchMethodError: 'java.util.Queue com.sun.tools.javac.util.Log$DeferredDiagnosticHandler.getDiagnostics()'

This was fixed in palantir-java-format 2.71.0 (July 2024) per palantir/palantir-java-format#1367.

Changes Made

Generator Configuration (generators/java/build.gradle):

  • Updated spotless plugin: 6.25.0 → 7.2.1
  • Updated palantir-java-format: 2.46.0 → 2.80.0

Generated SDK Template (AbstractGeneratorCli.java):

  • Changed palantirJavaFormat()palantirJavaFormat('2.80.0') to explicitly pin version
  • Spotless plugin version remains at 6.11.0 for generated SDKs (Java 8 compatible)

Seed Snapshots:

  • Updated 228 build.gradle files across seed/java-model and seed/java-sdk directories

Note: The intentional version split (spotless 7.2.1 for generator, 6.11.0 for generated SDKs) is required because:

  • The generator itself uses Java 11, so it can use spotless 7.x
  • Generated SDKs target Java 8 runtime, requiring spotless 6.x for build compatibility
  • Both versions support palantir-java-format 2.80.0

Testing

  • Verified build.gradle version changes in seed snapshots
  • Generator build.gradle compiles successfully
  • CRITICAL: CI must pass - seed tests will validate actual code compilation and formatting
  • No code formatting changes captured in this PR (seed tests run with --skip-scripts)

Review Checklist

⚠️ Important Items:

  1. Version Split Logic: Confirm that using spotless 7.2.1 for the generator (Java 11) and 6.11.0 for generated SDKs (Java 8 target) is correct and won't cause issues

  2. CI Test Results: MUST wait for CI to pass before merging. The seed tests will validate:

    • Generated SDKs compile successfully with new formatter version
    • No unexpected formatting changes break builds
    • Java 8 compatibility is maintained
  3. Formatting Behavior: Palantir-java-format 2.80.0 may format code differently than 2.46.0. Any cosmetic changes in generated Java code are expected but should be reviewed if CI shows differences

  4. Backward Compatibility: Verify this doesn't break customers using Java 8-21 for builds (spotless 6.11.0 supports Java 8+)

  5. Incomplete Snapshot Updates: This PR only updates build.gradle files. If the formatter produces different output, those changes will appear when CI runs the full seed tests

Known Limitations:

  • Formatting changes (if any) not visible in this PR because local seed tests were run with --skip-scripts
  • Relying on CI for comprehensive validation of the fix

Customer Impact

Positive:

  • Fixes build failures for customers using JDK 25 EA
  • Updates to latest stable formatter version (2.80.0) with bug fixes

Neutral:

  • No impact on customers using JDK 8-21 for builds
  • Generated SDK runtime requirements unchanged (still Java 8+)
  • May see minor formatting differences in generated code (cosmetic only)

…patibility

This fixes the NoSuchMethodError with getDiagnostics() that occurs when
running spotless with JDK 25 EA. The error was caused by an incompatibility
in palantir-java-format 2.46.0 with the Java compiler internals in JDK 25.

Changes:
- Updated palantir-java-format from 2.46.0 to 2.80.0 in build.gradle
- Updated spotless plugin from 6.25.0 to 7.2.1 in build.gradle
- Updated generated build.gradle to use palantir-java-format 2.80.0
- Updated generated build.gradle to use spotless plugin 7.2.1

The fix was released in palantir-java-format 2.71.0 (July 16, 2025) and
is included in version 2.80.0 (October 15, 2025).

Fixes: palantir/palantir-java-format#1366
Co-Authored-By: tanmay.singh@buildwithfern.com <tstanmay13@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

…rmat versions

All generated build.gradle files now use:
- spotless plugin 7.2.1 (was 6.11.0)
- palantir-java-format 2.80.0 (was unspecified, defaulting to old version)

This updates the seed snapshots to match the generator changes.

Co-Authored-By: tanmay.singh@buildwithfern.com <tstanmay13@gmail.com>
…ss/palantir-java-format versions

Co-Authored-By: tanmay.singh@buildwithfern.com <tstanmay13@gmail.com>
Co-Authored-By: tanmay.singh@buildwithfern.com <tstanmay13@gmail.com>
Co-Authored-By: tanmay.singh@buildwithfern.com <tstanmay13@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 25 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale This PR hasn't has any commits or comments in 25 days or more. label Nov 16, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This PR was closed because it has been inactive for 5 days after being marked stale.

@github-actions github-actions bot closed this Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale This PR hasn't has any commits or comments in 25 days or more.

Development

Successfully merging this pull request may close these issues.

0 participants