Skip to content

Java 21 migration - #475

Open
VincentCucchietti wants to merge 10 commits into
Hipparchus-Math:developfrom
VincentCucchietti:java-21-migration
Open

VincentCucchietti wants to merge 10 commits into
Hipparchus-Math:developfrom
VincentCucchietti:java-21-migration

Conversation

@VincentCucchietti

@VincentCucchietti VincentCucchietti commented Sep 17, 2026

Copy link
Copy Markdown

Migrate to Java 21

Mirrors the Java 21 migration already applied to orekit, using the same OpenRewrite
recipe sequence, one recipe per commit, followed by the manual follow-ups needed to
make the build target 21 cleanly.

Recipes:

  • Migrated to Java 17
  • Upgraded build to Java 21
  • Removed extra semicolons
  • Migrated to SequencedCollection (kept indexed .get(i) access wherever it sits
    next to other indexed access on the same list, for consistency)
  • Converted if-else construct to switch
  • Converted switch case assignments to switch expression
  • Converted switch case returns to switch expression

Follow-ups:

  • Switched compiler source/target to a single hipparchus.compiler.release property
  • Raised minimum required Java version (enforcer) to 21
  • Bumped CI to Java 21

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