{{ message }}
Foundation: Java 21 baseline + migration status#18
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
Foundation: Java 21 baseline + migration status#18devin-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:
cs.jdk.version11→21 in rootpom.xmlbuild.ymlJDK 17→21; added missing Apache license header and fixed trailing whitespace intrigger-package-and-publish.ymlJAVA_21_MIGRATION_STATUS.mdwith module-by-module analysis (7,597 Java files across 11 modules), deprecated API inventory (~253 hits in 9 categories), and a 6-phase rollout planSandbox verification: All 25 modules compile successfully with JDK 21 (
mvn install -DskipTests -pl server -am).Known blocker:
cglib-nodep:3.3.0cannot handle JDK 21 class files (major version 65), causingUnsupported class file major version 65errors inengine/schemaDAO 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 existingargLinecontains-noverify(deprecated since JDK 13) and several--add-opens/--add-exportsflags. 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 (fromripgrepscan of production sources excluding tests).Desktop build proof
BUILD SUCCESS (25 modules, JDK 21):

cglib blocker —

Unsupported class file major version 65(9 test errors):BUILD FAILURE summary:

Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
mvn install -DskipTests -Dcheckstyle.skip=true -pl server -am— BUILD SUCCESS across 25 modulesmvn test -pl engine/schema -Dtest=VMInstanceDaoImplTest) confirmed the expected cglib failure — 9 errors, 0 passes,Unsupported class file major version 65build.yml(full Maven build with JDK 21),rat.yml(license check),linter.yml(pre-commit), andmerge-conflict-checker.ymlHow did you try to break this feature and the system with this change?
Ran unit tests against
engine/schemato 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