Skip to content

Preparation for Migration of Checkstyle Codebase to Java 21 #17429

Closed

Description

@romani

similar to #17168
we need to update all internals to jdk21 usage but not a pom.xml with minimal jdk usage.

after preparation is done we will mirgate like we did at #17321 but in separate issue.

https://en.m.wikipedia.org/wiki/Java_version_history
https://docs.oracle.com/en/java/javase/24/migrate/significant-changes-jdk-21.html

Reason to enable preview features of jdk in checkstyle:

  • Checkstyle vis always behind in jdk usage by 1 or 2 lat releases.
  • Preview features are appearing and removed, good example is "String templates" in jdk21. It is very awaited feature by users, so user immediately would use it, but it challenging in consistent behavior, so it was removed few releases later. If checkstyle started to use such feature, it will be pain to refactor to stop using it. We removed support of string templates, as it was big problem for us to support too.
  • checkstyle has its own parser of java, so even jdk preview feature is in , and we enable them, on first usage of it checkstyle will fail to parse it , CI will be very red. So we naturally limited to features that checkstyle java parser supports. Adding features to our parser is huge effort, and highly unlikely to be done for preview features.

Final migration to jdk21 will be done at #17430

Activity

  1. changed the title [-]Preparation for jdk21 migration[/-] [+]Preparation for Migration of Checkstyle Codebase to Java 17[/+] on Jul 20, 2025
  2. changed the title [-]Preparation for Migration of Checkstyle Codebase to Java 17[/-] [+]Preparation for Migration of Checkstyle Codebase to Java 21[/+] on Jul 20, 2025
  3. added 5 commits that reference this issue on Aug 9, 2025
  4. added 2 commits that reference this issue on Aug 9, 2025
  5. added this to the 11.0.1 milestone on Aug 9, 2025
  6. added a commit that references this issue on Aug 10, 2025
  7. 145 remaining items

  8. added 3 commits that reference this issue on Aug 24, 2025
  9. added a commit that references this issue on Aug 26, 2025
  10. romani commented on Aug 26, 2025

    @romani
    MemberAuthor

    I think we are done here.

    final switch to jdk21 will be at #17430

  11. added 7 commits that reference this issue on Aug 26, 2025
  12. added a commit that references this issue on Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions