Skip to content

Migrate service build and codebase baseline to Java 25#97

Draft
patrick-vuong with Copilot wants to merge 2 commits into
mainfrom
copilot/migrate-to-java-25-3d7c7d83-6c2b-4fa4-aebe-d1e6750e7295
Draft

Migrate service build and codebase baseline to Java 25#97
patrick-vuong with Copilot wants to merge 2 commits into
mainfrom
copilot/migrate-to-java-25-3d7c7d83-6c2b-4fa4-aebe-d1e6750e7295

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

This PR migrates the project from Java 11 to Java 25 and applies compatible code/build modernizations so the service targets the new runtime level consistently across Maven and CI.

  • Build target + toolchain

    • Updated Maven Java target from 11 → 25 (maven.compiler.release, compiler plugin release).
    • Upgraded Java-sensitive Maven plugins to Java 25–compatible versions (compiler/surefire/failsafe).
    • Added JVM --add-opens args for surefire/failsafe to preserve test/runtime compatibility under newer JDK encapsulation.
  • CI runtime alignment

    • Updated GitHub Actions Java setup from JDK 11 → JDK 25 so CI executes with the same target runtime.
  • Source-level Java modernization

    • Applied recipe-driven language upgrades in touched classes:
      • pattern matching for instanceof
      • switch expression conversion
      • unnamed catch parameter usage
      • instance main signature migration where applicable
  • Migration note / blocker visibility

    • Local build failure after migration is error: release version 25 not supported, consistent with local runner using Java 17 instead of Java 25.
<!-- pom.xml -->
<properties>
  <maven.compiler.release>25</maven.compiler.release>
</properties>
...
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.15.0</version>
  <configuration>
    <release>25</release>
  </configuration>
</plugin>

This change was produced with Moderne CLI and Moderne Agent Tools (MCP).

Copilot AI linked an issue May 29, 2026 that may be closed by this pull request
Co-authored-by: patrick-vuong <107423518+patrick-vuong@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate project to Java 25 Migrate service build and codebase baseline to Java 25 May 29, 2026
Copilot AI requested a review from patrick-vuong May 29, 2026 16:08
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.

Migrate to Java 25

2 participants