Skip to content

[3.23] Java: make JDK 11 version normalisation in gradle buildless test robust - #22714

Open
sam-robson wants to merge 1 commit into
rc/3.23from
sam-robson/backport-jdk11-version-normalization-rc-3.23
Open

sam-robson wants to merge 1 commit into
rc/3.23from
sam-robson/backport-jdk11-version-normalization-rc-3.23

Conversation

@sam-robson

Copy link
Copy Markdown
Contributor

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.

`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>
@github-actions github-actions Bot added the Java label Sep 30, 2026
@sam-robson
sam-robson marked this pull request as ready for review October 1, 2026 15:28
@sam-robson
sam-robson requested a review from a team as a code owner October 1, 2026 15:28
Copilot AI balanced review requested due to automatic review settings October 1, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants