{{ message }}
Foundation: Java 21 baseline + migration status#16
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
Foundation: Java 21 baseline + migration status#16devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
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>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR establishes the foundation for migrating Apache CloudStack from JDK 11 to JDK 21. It contains three atomic changes:
pom.xml):cs.jdk.versionchanged from11to21..github/workflows/):build.yml: JDK17→21in thesetup-javastep.trigger-package-and-publish.yml: Added missing Apache License header; fixed trailing whitespace on thechmodline.JAVA_21_MIGRATION_STATUS.md): Module-by-module inventory (7,597+ Java files across 11 modules), deprecated API scan (263 hits across 9 categories), known blockers, effort estimates (12–18 dev-days), and a 6-phase rollout plan.No application source code is modified. The build command in
build.yml(mvn -B -P developer,systemvm -Dsimulator -DskipTests install) is intentionally unchanged.Sandbox verification: 25 modules compiled successfully with OpenJDK 21.0.10 via
mvn install -DskipTests -Dcheckstyle.skip=true -pl server -am.Known blocker identified:
cglib-nodep:3.3.0is a compile dependency inengine/schema(via Spring). While Mockito-based unit tests pass (using ByteBuddy), cglib 3.3.0 is unmaintained (last release 2019) and poses a risk for Spring CGLIB proxy generation with JDK 21 class files (major version 65). A follow-up PR is needed to migrate to ByteBuddy.Items for reviewer attention
pom.xmlargLine(not changed in this PR): The existing flags include-noverify(ignored since JDK 13) and several--add-opens/--add-exports. These may need revisiting for JDK 21 in a follow-up.test/,developer/). Both numbers are from production code only (test directories excluded from scan).ci.yml,codecov.yml,sonar-check.yml) still reference JDK 17 but are gated bygithub.repository == 'apache/cloudstack'and won't execute on this fork.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
BUILD SUCCESS — 25 modules compiled with JDK 21:
Unit test verification — engine/schema VMInstanceDaoImplTest (9/9 passed):
How Has This Been Tested?
mvn install -DskipTests -Dcheckstyle.skip=true -pl server -amwith OpenJDK 21.0.10 — BUILD SUCCESS (25 modules, ~64s).mvn test -pl engine/schema -Dtest=VMInstanceDaoImplTest -Dcheckstyle.skip=true— 9 tests passed.build.ymlworkflow with JDK 21.How did you try to break this feature and the system with this change?
VMInstanceDaoImplTest) to verify whether cglib 3.3.0 causesUnsupported class file major version 65errors. Tests passed (Mockito uses ByteBuddy), but cglib remains a compile dependency and a runtime risk — documented in the migration status.Link to Devin session: https://app.devin.ai/sessions/ade9c90352034c45b5fd8251bd45eade
Requested by: @hitomimimi