Update Java version requirement from 8 to 21#29
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Update Java version requirement from 8 to 21#29devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- test-module/pom.xml: Change javaCompilerVersion from 1.8 to 21 - README.md: Update minimum Java JDK version from 8 to 21 - OpenmrsUtil.java: Rewrite validateJavaVersion() to use Runtime.version().feature() < 21 instead of regex-based check for old-style 1.x version strings Co-Authored-By: Dillon Vargo <dillonvargo@gmail.com>
Author
🤖 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
Updated all remaining Java 8 references to Java 21 across three locations:
test-module/pom.xml: Changed<javaCompilerVersion>from1.8to21.README.md: Updated the documented minimum JDK version from 8 to 21.OpenmrsUtil.java(validateJavaVersion()): Replaced the old regex-based check ("1\\.[0-7]\\.(.*)") withRuntime.version().feature() < 21. The old regex only rejected pre-Java-9 version strings (1.0–1.7) and could never catch Java 9–20. The new check uses theRuntime.VersionAPI (available since Java 9) to properly reject any JVM below 21. Javadoc and error message updated accordingly.Issue I worked on
No JIRA issue — this is a consistency fix to align stale Java 8 references with the project's actual Java 21 requirement.
Checklist: I completed these to help reviewers :)
mvn clean packageright before creating this pull request and added all formatting changes to my commit.Things for reviewers to verify
Runtime.version().feature(): Confirm this is the preferred API for retrieving the major version on Java 21. (It is —Runtime.Version.feature()returns the feature-release counter, i.e.21for Java 21.)validateJavaVersion()exist and need updating to reflect the new threshold.Link to Devin session: https://app.devin.ai/sessions/7725de67874e4936ae707c4d76294861
Requested by: @dillonvargo