Skip to content

Migrate to Java 25#85

Draft
patrick-vuong with Copilot wants to merge 3 commits into
mainfrom
copilot/migrate-to-java-25-c249f25f-de74-400e-8fba-282bd1dbc05a
Draft

Migrate to Java 25#85
patrick-vuong with Copilot wants to merge 3 commits into
mainfrom
copilot/migrate-to-java-25-c249f25f-de74-400e-8fba-282bd1dbc05a

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor

Migrate project from Java 11 to Java 25 using OpenRewrite's UpgradeToJava25 recipe.

Build configuration

  • maven.compiler.release/target: 11 → 25
  • maven-compiler-plugin: 3.11.0 → 3.15.0
  • maven-surefire-plugin/maven-failsafe-plugin: 3.2.2 → 3.5.5
  • Added --add-opens JVM args for module system compatibility in test plugins

CI

  • actions/setup-java JDK: 11 → 25

Source modernization

  • Unnamed catch variables (_) for unused exception params
  • Pattern matching for instanceof (JEP 394)
  • Switch expressions with arrow syntax (JEP 361)
  • String.formatted() over String.format()
  • Instance main method (JEP 477)
// Before
if (event instanceof Wizard) {
    Wizard w = (Wizard) event;
    return "Wizard registration: " + w.getFirstName();
}

// After
if (event instanceof Wizard w) {
    return "Wizard registration: " + w.getFirstName();
}

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

Copilot AI linked an issue May 20, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits May 20, 2026 17:23
Agent-Logs-Url: https://github.com/moderneinc/yet-another-dropwizard-service/sessions/60d52d39-4c55-4895-a958-f3f19bd7d7a7

Co-authored-by: patrick-vuong <107423518+patrick-vuong@users.noreply.github.com>
Changes applied by org.openrewrite.java.migrate.UpgradeToJava25:

Build configuration:
- Update maven.compiler.release/target from 11 to 25
- Upgrade maven-compiler-plugin from 3.11.0 to 3.15.0
- Upgrade maven-surefire-plugin from 3.2.2 to 3.5.5
- Upgrade maven-failsafe-plugin from 3.2.2 to 3.5.5
- Add --add-opens JVM args for test plugins (Java module system)

CI:
- Update actions/setup-java to use JDK 25

Source code modernization:
- Use unnamed catch variable (_) for unused exception params
- Use pattern matching for instanceof (JEP 394)
- Use switch expressions (JEP 361)
- Use String.formatted() instead of String.format()
- Use instance main method (JEP 477)

Agent-Logs-Url: https://github.com/moderneinc/yet-another-dropwizard-service/sessions/60d52d39-4c55-4895-a958-f3f19bd7d7a7

Co-authored-by: patrick-vuong <107423518+patrick-vuong@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate project to Java 25 Migrate to Java 25 May 20, 2026
Copilot AI requested a review from patrick-vuong May 20, 2026 17:27
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