Foundation: Java 21 baseline + migration status by devin-ai-integration[bot] · Pull Request #19 · hitomimimi/cloudstack · GitHub
Skip to content

Foundation: Java 21 baseline + migration status#19

Open
devin-ai-integration[bot] wants to merge 3 commits into
att/4.22.0.0from
demo/java-21-foundation-v13
Open

Foundation: Java 21 baseline + migration status#19
devin-ai-integration[bot] wants to merge 3 commits into
att/4.22.0.0from
demo/java-21-foundation-v13

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented May 12, 2026

Copy link
Copy Markdown

Description

This PR establishes the foundation for migrating Apache CloudStack from JDK 11 to JDK 21. It contains three atomic changes:

  1. JDK version bumpcs.jdk.version 11 → 21 in root pom.xml
  2. CI workflow updatesbuild.yml JDK 17 → 21; trigger-package-and-publish.yml gets the missing Apache license header and trailing whitespace fix
  3. Migration status documentJAVA_21_MIGRATION_STATUS.md with module-by-module analysis, deprecated API inventory (253 hits across 9 categories), and a 6-phase rollout plan

Known blocker (not fixed here, intentionally): cglib-nodep 3.3.0 does not support JDK 21 class files (major version 65). DAO tests in engine/schema fail with Unsupported class file major version 65. The fix (cglib → ByteBuddy migration) is Phase 2 work.

Sandbox build of 25 modules (mvn install -DskipTests -pl server -am) compiles successfully with JDK 21.

Items for reviewer attention

  • pom.xml line 58: Verify that cs.jdk.version is only used for maven-compiler-plugin source/target and doesn't have unexpected downstream effects
  • argLine (pom.xml line 61): Still contains -noverify which was removed in JDK 13 — may need follow-up
  • build.yml: Was previously JDK 17 while pom.xml was JDK 11; this PR aligns both to 21. Build command (-pl server -am) is unchanged
  • JAVA_21_MIGRATION_STATUS.md: Deprecated API hit counts are based on regex scanning and are approximate

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

BUILD SUCCESS — 25 modules compiled with JDK 21:
BUILD SUCCESS

BUILD FAILURE — cglib blocker (Unsupported class file major version 65):
cglib blocker

How Has This Been Tested?

  • Sandbox build: mvn install -DskipTests -Dcheckstyle.skip=true -pl server -am with OpenJDK 21 — BUILD SUCCESS (25 modules, ~78 sec)
  • Sandbox test: mvn test -pl engine/schema -Dtest=VMInstanceDaoImplTest -Dcheckstyle.skip=trueBUILD FAILURE confirming the cglib blocker (9 errors, 0 failures)
  • CI workflows validated via PR checks

How did you try to break this feature and the system with this change?

Ran a targeted DAO test (VMInstanceDaoImplTest) to verify JDK 21 test compatibility, which surfaced the cglib-nodep 3.3.0 incompatibility. This blocker is documented in JAVA_21_MIGRATION_STATUS.md and tracked as Phase 2 work. No application source code was modified.

Link to Devin session: https://app.devin.ai/sessions/6199fc8221124d9b88f85d763000e2ab
Requested by: @hitomimimi


Open in Devin Review

devin-ai-integration Bot and others added 3 commits May 12, 2026 00:55
Co-Authored-By: hitomi.sawamura@gmail.com <hitomi.sawamura@gmail.com>
… issues

Co-Authored-By: hitomi.sawamura@gmail.com <hitomi.sawamura@gmail.com>
Co-Authored-By: hitomi.sawamura@gmail.com <hitomi.sawamura@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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.

1 participant