Update Java 17 references to Java 21#16
Open
dillonvargo wants to merge 1 commit into
Open
Conversation
- Remove java17 Maven profile (java21 profile already exists) - Update validateJavaVersion() to require Java 21+ - Update README.md minimum Java version to 21 Co-Authored-By: Dillon Vargo <dillonvargo@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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 of what I changed
Standardizes Java 21 as the minimum required version across the codebase by:
java17Maven profile frompom.xml— the identicaljava21profile already exists, so this is a clean removal with no loss of dependency overrides for Java 21+ builds.OpenmrsUtil.validateJavaVersion()— the old regex (1\\.[0-7]\\.(.*)) only rejected pre-Java 9 version strings. The new implementation parses the major version integer and rejects anything below 21.README.md— changed the documented minimum JDK version from 8 to 21.Things for reviewers to pay attention to
validateJavaVersion(): Version strings without a dot but with a suffix (e.g.21-ea) will failInteger.parseIntand be rejected due to themajorVersion = 0fallback. Standard release version strings like21,21.0.1,21.0.2-eaare handled correctly.validateJavaVersion(), they may need updating to reflect the new minimum. No new tests were added for the rewritten parsing logic.java17profile means Java 17 builds will no longer get the mockito/bytebuddy version overrides. This is intentional per the requirement to drop Java 17 support.Issue I worked on
see https://issues.openmrs.org/browse/TRUNK-
Checklist: I completed these to help reviewers :)
mvn clean packageright before creating this pull request and added all formatting changes to my commit.Link to Devin run: https://app.devin.ai/sessions/9b3964bb0ad8410da7f623f87094399f
Requested by: @dillonvargo