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

Foundation: Java 21 baseline + migration status#18

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

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

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 updatebuild.yml JDK 17→21; added missing Apache license header and fixed trailing whitespace in trigger-package-and-publish.yml
  3. Migration status documentJAVA_21_MIGRATION_STATUS.md with module-by-module analysis (7,597 Java files across 11 modules), deprecated API inventory (~253 hits in 9 categories), and a 6-phase rollout plan

Sandbox verification: All 25 modules compile successfully with JDK 21 (mvn install -DskipTests -pl server -am).

Known blocker: cglib-nodep:3.3.0 cannot handle JDK 21 class files (major version 65), causing Unsupported class file major version 65 errors in engine/schema DAO tests. This is documented and intentionally not fixed here — the fix (cglib→ByteBuddy migration) is Phase 2.

No application source code is modified.

Key items for review

  • pom.xml: The existing argLine contains -noverify (deprecated since JDK 13) and several --add-opens/--add-exports flags. These are unchanged but may need revisiting in a follow-up.
  • build.yml: Only the JDK version changed; the Maven build command is untouched.
  • JAVA_21_MIGRATION_STATUS.md: Deprecated API counts are approximate (from ripgrep scan of production sources excluding tests).

Desktop build proof

BUILD SUCCESS (25 modules, JDK 21):
BUILD SUCCESS

cglib blocker — Unsupported class file major version 65 (9 test errors):
cglib error detail

BUILD FAILURE summary:
BUILD FAILURE

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

How Has This Been Tested?

  • Sandbox build verified with JDK 21: mvn install -DskipTests -Dcheckstyle.skip=true -pl server -am — BUILD SUCCESS across 25 modules
  • Targeted test run (mvn test -pl engine/schema -Dtest=VMInstanceDaoImplTest) confirmed the expected cglib failure — 9 errors, 0 passes, Unsupported class file major version 65
  • CI runs build.yml (full Maven build with JDK 21), rat.yml (license check), linter.yml (pre-commit), and merge-conflict-checker.yml

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

Ran unit tests against engine/schema to surface JDK 21 incompatibilities. This confirmed the cglib blocker which is the primary risk of the JDK upgrade and is documented in the migration status document.

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


Open in Devin Review

devin-ai-integration Bot and others added 3 commits May 11, 2026 23:59
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 3 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