GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use palantir-java-format 2.57.0 on Java 21 by matsev · Pull Request #2447 · diffplug/spotless

Conversation

@matsev

@matsev matsev commented Mar 13, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Updates the Palantir Java formatter to version 2.57.0 for improved code formatting for Java 21

ref: palantir/palantir-java-format#952 and palantir/palantir-java-format#1211

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

koppor reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
matsev added 2 commits March 13, 2025 17:23
@matsev
bump palantir to version 2.57.0
97555db
improved code formatting for Java 21
ref: palantir/palantir-java-format#952
@matsev
update readme files with changes
43208ac
Goooler
Goooler approved these changes Mar 14, 2025
View reviewed changes
Comment thread CHANGES.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread plugin-gradle/CHANGES.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread plugin-maven/CHANGES.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Goooler Goooler changed the title bump palantir to version 2.57.0 Use palantir-java-format 2.57.0 on Java 21 Mar 14, 2025
matsev added 2 commits March 14, 2025 06:02
@matsev
update copyright year in modified files
63c64a5
@matsev
add "changed" labels
7cd5377
@Goooler
Goooler merged commit f6da1c4 into diffplug:main Mar 14, 2025
@matsev
matsev deleted the palantir-2_57_0 branch March 14, 2025 07:23
@nedtwigg

nedtwigg commented Apr 8, 2025

Copy link
Copy Markdown
Member

Published in plugin-gradle 7.0.3 and plugin-maven 2.44.4

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jglick

jglick commented May 19, 2025

Copy link
Copy Markdown
Contributor

This has been causing problems in Jenkins plugins using the default configuration because certain switch statements are formatted one way when Maven is run using JDK 17 and another when it is run using JDK 21, despite the fact that the source level of the project is a constant (17).

spotless/lib/src/main/java/com/diffplug/spotless/java/PalantirJavaFormatStep.java

Lines 86 to 88 in 6f1919f

public static String defaultVersion() {
return JVM_SUPPORT.getRecommendedFormatterVersion();
}
seems wrong; it should be inspecting the source level of the project (as defined by maven-compiler-plugin), without reference to the version of Java which happens to be running the tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jglick jglick mentioned this pull request May 19, 2025
Enable toggleOffOn feature for spotless jenkinsci/plugin-pom#1123
Merged
6 tasks done
@basil basil mentioned this pull request Jun 3, 2025
Spotless formats code differently between JDK versions (17 vs 21) #2503
Closed
slawekjaranowski added a commit to mojohaus/mojo-parent that referenced this pull request Jun 12, 2025
@slawekjaranowski
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs
68e4702
Spotless start using palantir-java-format 2.57.0 on Java 21 - on older jdks different versions are used.

It causes a different code format depends on using JDK

references:
 - diffplug/spotless#2447
 - diffplug/spotless#2503
 - palantir/palantir-java-format#1320

Additionally, we can't use older spotless on JDK8
@slawekjaranowski slawekjaranowski mentioned this pull request Jun 12, 2025
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs mojohaus/mojo-parent#634
Merged
slawekjaranowski added a commit to slawekjaranowski/maven-parent that referenced this pull request Jun 12, 2025
@slawekjaranowski
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs
13255c8
Spotless start using palantir-java-format 2.57.0 on Java 21 - on older jdks different versions are used.

It causes a different code format depends on using JDK

references:
 - diffplug/spotless#2447
 - diffplug/spotless#2503
 - palantir/palantir-java-format#1320

As issue - diffplug/spotless#2503 was closed, reverting spotless plugin to an older version is not a resolution.
@slawekjaranowski slawekjaranowski mentioned this pull request Jun 12, 2025
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs apache/maven-parent#477
Merged
slawekjaranowski added a commit to slawekjaranowski/maven-parent that referenced this pull request Jun 13, 2025
@slawekjaranowski
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs
c0bd503
Spotless start using palantir-java-format 2.57.0 on Java 21 - on older jdks different versions are used.

It causes a different code format depends on using JDK

references:
 - diffplug/spotless#2447
 - diffplug/spotless#2503
 - palantir/palantir-java-format#1320

As issue - diffplug/spotless#2503 was closed, reverting spotless plugin to an older version is not a resolution.
slawekjaranowski added a commit to apache/maven-parent that referenced this pull request Jun 13, 2025
@slawekjaranowski
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs
9014c35
Spotless start using palantir-java-format 2.57.0 on Java 21 - on older jdks different versions are used.

It causes a different code format depends on using JDK

references:
 - diffplug/spotless#2447
 - diffplug/spotless#2503
 - palantir/palantir-java-format#1320

As issue - diffplug/spotless#2503 was closed, reverting spotless plugin to an older version is not a resolution.
slawekjaranowski added a commit to mojohaus/mojo-parent that referenced this pull request Jun 13, 2025
@slawekjaranowski
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs
335f685
Spotless start using palantir-java-format 2.57.0 on Java 21 - on older jdks different versions are used.

It causes a different code format depends on using JDK

references:
 - diffplug/spotless#2447
 - diffplug/spotless#2503
 - palantir/palantir-java-format#1320

Additionally, we can't use older spotless on JDK8
slawekjaranowski added a commit to mojohaus/mojo-parent that referenced this pull request Jun 13, 2025
@slawekjaranowski
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs
4bdba1c
Spotless start using palantir-java-format 2.57.0 on Java 21 - on older jdks different versions are used.

It causes a different code format depends on using JDK

references:
 - diffplug/spotless#2447
 - diffplug/spotless#2503
 - palantir/palantir-java-format#1320

Additionally, we can't use older spotless on JDK8
slawekjaranowski added a commit to mojohaus/mojo-parent that referenced this pull request Jun 13, 2025
@slawekjaranowski
Use spotless / palantirJavaFormat - 2.56.0 for all JDKs
ca812c1
Spotless start using palantir-java-format 2.57.0 on Java 21 - on older jdks different versions are used.

It causes a different code format depends on using JDK

references:
 - diffplug/spotless#2447
 - diffplug/spotless#2503
 - palantir/palantir-java-format#1320

Additionally, we can't use older spotless on JDK8
@jglick jglick mentioned this pull request Jun 26, 2025
Declare formatter version to avoid spotless choosing a version jenkinsci/plugin-pom#1151
Merged
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@Goooler Goooler Goooler approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@matsev @nedtwigg @jglick @Goooler
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.