Upgrade Java version references from Java 8/17 to Java 21#17
Open
dillonvargo wants to merge 1 commit into
Open
Upgrade Java version references from Java 8/17 to Java 21#17dillonvargo wants to merge 1 commit into
dillonvargo wants to merge 1 commit into
Conversation
- Update validateJavaVersion() to require Java 21 minimum - Update README.md to reference Java 21 as minimum version - Remove obsolete Java 17 Maven profile (Java 21 is now minimum) 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
Updates all outdated Java version references to reflect that Java 21 is now the minimum required version (matching the existing
javaCompilerVersionproperty of 21 inpom.xml).Three files changed:
api/src/main/java/org/openmrs/util/OpenmrsUtil.java— RewrotevalidateJavaVersion()to require Java 21 minimum. The old implementation used a regex (1\\.[0-7]\\.(.*)) that only rejected Java 7 and below under the legacy1.xversioning scheme. The new implementation parses the major version integer fromjava.version, handling both legacy1.xand modernX.y.zformats.README.md— Updated minimum Java JDK version from 8 to 21.pom.xml— Removed thejava17Maven profile. It provided the same mockito/bytebuddy dependency overrides as thejava21andjava24profiles and is no longer needed now that Java 21 is the minimum. Thejava21andjava24profiles are retained.Not changed:
startup.sh— Its debug port logic checksJAVA_VERSION > 8, which remains correct for Java 21+.validateJavaVersion(): The new parsing splits on'.'to extract the major version. Version strings without a dot that contain non-numeric suffixes (e.g.,21-ea,21+35) would cause aNumberFormatExceptionfromInteger.parseInt. Consider whether a dash/plus-aware split is needed, or whether this is acceptable since early-access JDKs aren't a supported runtime target.validateJavaVersion()logic. Existing tests (if any) for this method would now be stale.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/b4f61cbb1e71411abb6ab1346f3aac41
Requested by: @dillonvargo