[Java] - Feature fix - #1713
Open
Kaniska (Kaniska244) wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Java 25 installation via SDKMAN by widening the SDKMAN candidate-matching regex to include build metadata segments (e.g. 25.0.4+1-ms), and adds test coverage to ensure Java 25 installs and runs correctly.
Changes:
- Updated the Java SDKMAN version extraction regex to accept both
.and+qualifier/build-metadata segments. - Applied the regex fix for both the primary Java version and
additionalVersions. - Added a dedicated Java 25 scenario plus updated additional-versions coverage, and bumped the feature version.
Show a summary per file
| File | Description |
|---|---|
| test/java/scenarios.json | Adds a Java 25 scenario and includes Java 25 in the additional versions scenario. |
| test/java/install_java_25.sh | New scenario test validating Java 25 install, compile/run, and candidate naming format. |
| test/java/install_additional_java.sh | Extends additional-versions scenario assertions to include Java 25. |
| src/java/install.sh | Updates SDKMAN Java candidate-matching regex to include + build metadata. |
| src/java/devcontainer-feature.json | Bumps the Java feature version from 1.8.1 to 1.8.2. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
| fi | ||
|
|
||
| sdk_install java ${JAVA_VERSION} "\\s*" "(\\.[a-z0-9]+)*-" ".*-[a-z]+$" "true" | ||
| sdk_install java ${JAVA_VERSION} "\\s*" "([.+][a-z0-9]+)*-" ".*-[a-z]+$" "true" |
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.
Summary
Fixes Java 25 installation through SDKMAN using the default Microsoft JDK distribution.
SDKMAN publishes Java 25 candidates with build metadata, such as
25.0.4+1-ms. The existing regex only accepted dot-prefixed qualifiers, causing Java 25 candidates containing+1to be excluded from the available version list.Changes
(\.[a-z0-9]+)*-to([.+][a-z0-9]+)*-.25.0.4+1-ms.additionalVersions.1.8.1to1.8.2.Testing
The new
install_java_25scenario verifies:25.x+build-msformat.The updated
install_additional_javascenario verifies:additionalVersions.Related to #1308.