Skip to content

Upgrade Java 8 to Java 17#321

Closed
handsomewu6688-design wants to merge 1 commit into
apache:masterfrom
handsomewu6688-design:openrewrite-upgrade-java17
Closed

Upgrade Java 8 to Java 17#321
handsomewu6688-design wants to merge 1 commit into
apache:masterfrom
handsomewu6688-design:openrewrite-upgrade-java17

Conversation

@handsomewu6688-design
Copy link
Copy Markdown

@handsomewu6688-design handsomewu6688-design commented May 19, 2026

Summary

This PR upgrades the project from Java 8 to Java 17, applying modern Java language features and updating the build configuration accordingly.

Changes

  • Updated source/target from 8 to 17
  • Applied instanceof pattern matching
  • Added @serial annotation to serialVersionUID fields
  • Converted String.format to .formatted
  • Replaced Paths.get with Path.of
  • Converted multiline strings to text blocks

Statistics

129 files changed, 476 insertions, 270 deletions

Verification

  • BUILD SUCCESS with JDK 17 across all 14 modules

- 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.
@handsomewu6688-design handsomewu6688-design force-pushed the openrewrite-upgrade-java17 branch from 09929ac to c58c623 Compare May 19, 2026 10:03
@handsomewu6688-design handsomewu6688-design changed the title Upgrade Java 8 to Java 17 via OpenRewrite UpgradeToJava17 recipe Upgrade Java 8 to Java 17 May 19, 2026
@aherbert
Copy link
Copy Markdown
Contributor

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.

@aherbert aherbert closed this May 19, 2026
@handsomewu6688-design
Copy link
Copy Markdown
Author

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.
If there is stable demand, we are willing to long-term maintain 2–3 newer JDK branches.

Could we create a dedicated issue to discuss this?

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.

2 participants