[3.23] Java: make JDK 11 version normalisation in gradle buildless test robust - #22714
Open
sam-robson wants to merge 1 commit into
Open
sam-robson wants to merge 1 commit into
sam-robson wants to merge 1 commit into
Conversation
`java.version` may carry a fourth `$PATCH` component (JEP 322), as in Temurin `jdk-11.0.32.1+1`. The previous pattern matched exactly three components, so the trailing `.1` survived and the test reported `11.1`. Accept any number of version components, and anchor on the surrounding quotes so the substitution only rewrites a whole JSON string rather than version-like text elsewhere in the diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The scoped regex correctly handles additional numeric components without matching partial quoted values.
Review effort: Balanced
Findings: None
What changed in this PR
Makes the Gradle buildless integration test robust to JDK 11 versions with additional numeric components.
Changes:
- Normalizes complete quoted JDK 11 version values to
"11". - Documents why variable-length version components are expected.
| File | Description |
|---|---|
java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/test.py |
Broadens JDK 11 diagnostics normalization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Backports the JDK 11 diagnostics normalization fix to
rc/3.23.Hosted JDK 11 versions can include a fourth version component. The test now normalizes any number of numeric components while matching only a complete quoted value.