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

Foundation: Java 21 baseline + migration status#14

Open
devin-ai-integration[bot] wants to merge 3 commits into
demo/java-21-foundation-v8from
devin/1778488089-java-21-foundation
Open

Foundation: Java 21 baseline + migration status#14
devin-ai-integration[bot] wants to merge 3 commits into
demo/java-21-foundation-v8from
devin/1778488089-java-21-foundation

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown

Description

This PR establishes the Java 21 migration foundation for Apache CloudStack 4.22.0.0. It bumps the compile/target JDK version, updates CI to build with JDK 21, and adds a comprehensive migration status document based on automated codebase analysis of 7,595 Java source files.

Changes:

  1. pom.xml — Bump cs.jdk.version from 1121 (controls maven-compiler-plugin source/target for all modules)
  2. build.yml — Update CI JDK from 1721 (step name + java-version parameter). Build command (mvn install -DskipTests) is unchanged.
  3. trigger-package-and-publish.yml — Add missing Apache License header (required by RAT check) and fix trailing whitespace
  4. JAVA_21_MIGRATION_STATUS.md — New document: module-by-module file inventory, deprecated API scan across 9 categories (~249 usages found), cglib 3.3.0 blocker analysis, effort estimates, and 6-phase rollout plan

Key finding: cglib-nodep 3.3.0 is unmaintained and causes Unsupported class file major version 65 errors in 64 engine/schema DAO tests. This is why -DskipTests remains in CI. The fix requires migrating from cglib to ByteBuddy (Phase 3 in the rollout plan).

Important for review:

  • No application source code is modified — only build config, CI workflows, and documentation
  • The argLine property in pom.xml (JVM flags like --add-opens) is not changed in this PR — may need future updates for JDK 21
  • Other CI workflows (ci.yml, codecov.yml, sonar-check.yml) still reference JDK 17 but are gated by github.repository == 'apache/cloudstack' and won't run on this fork
  • Sandbox build verified: BUILD SUCCESS on JDK 21 — 25 modules compiled successfully

Desktop build verification

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?

  • Local sandbox build with JDK 21 (OpenJDK 21.0.10): mvn install -DskipTests -Dcheckstyle.skip=true -pl server -am — BUILD SUCCESS across 25 modules in ~49s
  • CI build on this PR with mvn -B -P developer,systemvm -Dsimulator -DskipTests install -T$(nproc) using JDK 21
  • Tests are intentionally skipped (-DskipTests) due to the cglib 3.3.0 blocker documented in the migration status

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

  • Verified that JDK version bump from 11→21 does not introduce compilation errors across the full module tree (server + all dependencies)
  • Confirmed that the only test failures are caused by the known cglib incompatibility, not by the JDK version change itself

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


Open in Devin Review

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

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