Skip to content

Issue #18789: Activate Java 21 migration recipes in OpenRewrite CI#18897

Merged
romani merged 1 commit into
checkstyle:masterfrom
ayushactiveat:issue-18789-activate-java21
Feb 8, 2026
Merged

Issue #18789: Activate Java 21 migration recipes in OpenRewrite CI#18897
romani merged 1 commit into
checkstyle:masterfrom
ayushactiveat:issue-18789-activate-java21

Conversation

@ayushactiveat

Copy link
Copy Markdown
Contributor

fixes #18789
Activating the UpgradeToJava21 and SequencedCollection recipes that were temporarily disabled. it also includes the configuration change and the resulting Java source code migrations

@ayushactiveat ayushactiveat force-pushed the issue-18789-activate-java21 branch 3 times, most recently from 1e3dd9a to f2d1465 Compare February 8, 2026 17:53
@ayushactiveat

ayushactiveat commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

@romani , I had to disable tech.picnic.errorprone.refasterrules.CollectionRulesRecipes because it contains a rule (SortedSetFirstRecipe) that reverts getFirst() back to first(), causing a CI loop failure.

first(): This method has been part of the SortedSet interface since early versions of the Java Collections Framework (Java SE 1.2).
getFirst(): This method was added as a default method in Java 21 as part of the new Sequenced Collections API (JEP-431). The goal of this addition was to provide a unified and consistent naming convention (getFirst(), getLast(), removeFirst(), etc.) across all sequenced collections (like List, Deque, and SortedSet).

@ayushactiveat ayushactiveat force-pushed the issue-18789-activate-java21 branch from f2d1465 to 69f06ca Compare February 8, 2026 18:15

@romani romani 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.

thanks a lot.

@romani romani merged commit 0c01881 into checkstyle:master Feb 8, 2026
124 checks passed
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.

Activate Java 21 migration recipes in OpenRewrite CI

2 participants