Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

basil
Copy link
Member

@basil basil commented Aug 7, 2023

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.

Copy link
Member

@NotMyFault NotMyFault left a comment

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
Copy link
Member Author

basil commented Aug 7, 2023

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

@basil basil merged commit ef3559f into jenkinsci:master Aug 7, 2023
1 check passed
@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