Upgrade Java 8 to Java 17#321
Conversation
- Apply instanceof pattern matching - Add @serial annotation to serialVersionUID fields - Convert String.format to .formatted - Replace Paths.get with Path.of - Convert multiline strings to text blocks All modules build successfully with JDK 17.
09929ac to
c58c623
Compare
|
Upgrade of the Java version for any library jar file will affect downstream users and is not a decision made without discussion. Ideally a library should be compatible with all Java Long-Term Support (LTS) releases, unless the intended functionality is significantly compromised. The Commons project aims to target Java 8 until the version is end-of-life, or a component's functionality requires a newer Java version. |
Thank you for your clear explanation. We fully understand and respect that the project will keep Java 8 as the baseline and will not change the official JDK version for the main branch. Our proposal is to independently maintain several parallel branches for newer LTS JDK versions (such as 17, 21). The official main branch can continue to develop normally based on Java 8, and we will take full responsibility for maintaining and synchronizing these upgraded branches. This will not affect any downstream users or break compatibility. We are currently doing JDK adaptation work across multiple projects and collecting community feedback. Could we create a dedicated issue to discuss this? |
Summary
This PR upgrades the project from Java 8 to Java 17, applying modern Java language features and updating the build configuration accordingly.
Changes
Statistics
129 files changed, 476 insertions, 270 deletions
Verification