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

Make PMD buildable with java 21 #4699

Merged
merged 3 commits into from
Oct 19, 2023
Merged

Conversation

adangel
Copy link
Member

@adangel adangel commented Sep 29, 2023

This is the only change needed, so that PMD builds with java21. This seems to be a bug in mockito (see mockito/mockito#3121) but we seem to use this edge case only here. So I opted to go the simple way...

(mockito fails to call the default method newListener() on interface Renderer).

This makes mockito be happy even with java21.
@ghost
Copy link

ghost commented Sep 29, 2023

1 Message
📖 No regression tested rules have been changed.

Generated by 🚫 Danger

@adangel
Copy link
Member Author

adangel commented Sep 30, 2023

Apparently it is a older byte-buddy dependency. We use mockito 4.11.0, which uses byte-buddy 1.12.19. Updating this might also help.

@adangel
Copy link
Member Author

adangel commented Oct 18, 2023

Apparently it is a older byte-buddy dependency. We use mockito 4.11.0, which uses byte-buddy 1.12.19. Updating this might also help.

Yes, this works: byte-buddy 1.14.3 or newer supports Java 21.

@adangel adangel added this to the 7.0.0 milestone Oct 18, 2023
adangel added a commit that referenced this pull request Oct 19, 2023
adangel added a commit that referenced this pull request Oct 19, 2023
@adangel adangel merged commit 6366dc3 into pmd:master Oct 19, 2023
@adangel adangel deleted the build-with-java21 branch October 19, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant