Skip to content

Upgrade palantir-java-format to Java 21 compatible release#816

Merged
basil merged 1 commit into
jenkinsci:masterfrom
basil:palantir-java-format
Aug 7, 2023
Merged

Upgrade palantir-java-format to Java 21 compatible release#816
basil merged 1 commit into
jenkinsci:masterfrom
basil:palantir-java-format

Conversation

@basil

@basil basil commented Aug 7, 2023

Copy link
Copy Markdown
Member

When running palantir-java-format with Java 21, the current release fails with java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()'. This error was fixed in palantir/palantir-java-format#909 and released in 2.35.0; however, pending diffplug/spotless#1774 that version is not used by Spotless. This PR adopts the workaround suggested in diffplug/spotless#1774 (comment) by pinning the version until such a time that Spotless delivers version 2.35.0 by default.

Testing done

Ran mvn clean verify in text-finder before these changes on Java 11, 17, and 21. 11 and 17 passed; 21 failed with the error reported above. After these changes, passed on 11, 17, and 21.

@NotMyFault NotMyFault left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do certain conditions need to be satisfied for it to fail? I don't encounter these issues in design library, but text-finder.

@basil

basil commented Aug 7, 2023

Copy link
Copy Markdown
Member Author

spotless.check.skip has to be set to false for it to fail

@basil
basil merged commit ef3559f into jenkinsci:master Aug 7, 2023
@basil
basil deleted the palantir-java-format branch August 7, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants