matsim-libs
matsim-libs copied to clipboard
Migrate from Java 17 to 21
Java 21 LTS has now been release for 6 months, which may be a good time to see if we can start upgrading to Java 21. This PR tests that by updating the pom.xml
and the GitHub Actions workflows to use Java 21 LTS instead of Java 17 LTS.
The previous Java upgrade was done and discussed here:
- #2043
Potentially interesting articles:
New features in JDK 18, 19, 20 and 21 are:
JDK 18
- 400: UTF-8 by Default
- 408: Simple Web Server
- 413: Code Snippets in Java API Documentation
- 416: Reimplement Core Reflection with Method Handles
- 417: Vector API (Third Incubator)
- 418: Internet-Address Resolution SPI
- 419: Foreign Function & Memory API (Second Incubator)
- 420: Pattern Matching for switch (Second Preview)
- 421: Deprecate Finalization for Removal
JDK 19
- 405: Record Patterns (Preview)
- 422: Linux/RISC-V Port
- 424: Foreign Function & Memory API (Preview)
- 425: Virtual Threads (Preview)
- 426: Vector API (Fourth Incubator)
- 427: Pattern Matching for switch (Third Preview)
- 428: Structured Concurrency (Incubator)
JDK 20
- 429: Scoped Values (Incubator)
- 432: Record Patterns (Second Preview)
- 433: Pattern Matching for switch (Fourth Preview)
- 434: Foreign Function & Memory API (Second Preview)
- 436: Virtual Threads (Second Preview)
- 437: Structured Concurrency (Second Incubator)
- 438: Vector API (Fifth Incubator)
JDK 21
- 430: String Templates (Preview)
- 431: Sequenced Collections
- 439: Generational ZGC
- 440: Record Patterns
- 441: Pattern Matching for switch
- 442: Foreign Function & Memory API (Third Preview)
- 443: Unnamed Patterns and Variables (Preview)
- 444: Virtual Threads
- 445: Unnamed Classes and Instance Main Methods (Preview)
- 446: Scoped Values (Preview)
- 448: Vector API (Sixth Incubator)
- 449: Deprecate the Windows 32-bit x86 Port for Removal
- 451: Prepare to Disallow the Dynamic Loading of Agents
- 452: Key Encapsulation Mechanism API
- 453: Structured Concurrency (Preview)