Skip to content

feat: upgrade Java compilation target from 17 to 21#390

Merged
soul2zimate merged 3 commits into
guacsec:mainfrom
soul2zimate:TC-3969
Apr 1, 2026
Merged

feat: upgrade Java compilation target from 17 to 21#390
soul2zimate merged 3 commits into
guacsec:mainfrom
soul2zimate:TC-3969

Conversation

@soul2zimate

@soul2zimate soul2zimate commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
  • Update maven.compiler.release from 17 to 21 in pom.xml
  • Update CI PR workflow MAIN_JAVA_VER to 21 and simplify test matrix
  • Update CI release workflow to use Java 21
  • Add Java 21 minimum requirement to README
  • Revise Known Issues section for Java 17 hang warning

Implements TC-3969

Assisted-by: Claude Code

- Update maven.compiler.release from 17 to 21 in pom.xml
- Update CI PR workflow MAIN_JAVA_VER to 21 and simplify test matrix
- Update CI release workflow to use Java 21
- Add Java 21 minimum requirement to README
- Revise Known Issues section for Java 17 hang warning

Implements TC-3969

Assisted-by: Claude Code
@qodo-code-review

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Upgrade Java compilation target to version 21

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Upgrade Java compilation target from 17 to 21
• Simplify CI test matrix to only Java 21
• Update CI workflows to use Java 21
• Add Java 21 minimum requirement documentation
• Revise Known Issues section for Java 17 compatibility
Diagram
flowchart LR
  pom["pom.xml<br/>maven.compiler.release: 17→21"]
  pr_workflow["pr.yml<br/>MAIN_JAVA_VER: 17→21<br/>matrix: [17,21]→[21]"]
  release_workflow["release.yml<br/>java-version: 17→21"]
  readme["README.md<br/>Add Java 21 requirement<br/>Update Known Issues"]
  pom --> pr_workflow
  pom --> release_workflow
  pom --> readme
Loading

Grey Divider

File Changes

1. pom.xml ⚙️ Configuration changes +1/-1

Update Maven compiler release to Java 21

• Update maven.compiler.release property from 17 to 21
• Aligns project compilation target with new minimum Java version requirement

pom.xml


2. .github/workflows/pr.yml ⚙️ Configuration changes +2/-2

Simplify PR workflow to Java 21 only

• Update MAIN_JAVA_VER environment variable from 17 to 21
• Simplify test matrix from [17, 21] to [21] only
• Reduces CI test redundancy by removing Java 17 testing

.github/workflows/pr.yml


3. .github/workflows/release.yml ⚙️ Configuration changes +2/-2

Update release workflow to Java 21

• Update Java setup step from version 17 to 21
• Update java-version parameter in actions/setup-java@v5 action
• Ensures release builds use Java 21

.github/workflows/release.yml


View more (1)
4. README.md 📝 Documentation +5/-4

Add Java 21 requirement and update documentation

• Add prominent notice requiring Java 21 or later at top of README
• Revise Known Issues section to reflect Java 21 minimum requirement
• Update Java 17 hang warning to clarify issue is now resolved
• Minor grammar improvements in Known Issues documentation

README.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Enforcer JDK mismatch🐞 Bug ☼ Reliability
Description
pom.xml now compiles with maven.compiler.release=21, but the Maven Enforcer rule still allows Java
[11,), so builds on JDK 11–20 will pass validate and then fail later during compilation with a
less actionable error.
Code

pom.xml[19]

+    <maven.compiler.release>21</maven.compiler.release>
Evidence
The project is configured to compile for Java 21, but the enforcer rule does not enforce Java 21+
and will accept older JDKs, causing late-stage compilation failures instead of an early, clear
validation failure.

pom.xml[14-21]
pom.xml[610-636]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The build is configured for Java 21 bytecode (`maven.compiler.release=21`), but Maven Enforcer still permits running Maven with JDK 11–20 (`requireJavaVersion` is `[11,)`). This causes validation to succeed and compilation to fail later with a less helpful error.

## Issue Context
With `maven.compiler.release=21`, compiling requires JDK 21+.

## Fix Focus Areas
- pom.xml[610-636]
- pom.xml[14-21]

## Suggested change
Update the enforcer rule to require Java 21+ (e.g., `<version>[21,)</version>`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Contributing badge outdated🐞 Bug ⚙ Maintainability
Description
README now states Java 21 is required, but CONTRIBUTING.md still advertises a Java Version 11 badge,
which misleads contributors about prerequisites.
Code

README.md[R6-7]

+**Requires Java 21 or later.**
+
Evidence
The README explicitly declares Java 21+ as the minimum, while CONTRIBUTING.md’s badge link still
points to Java Version 11, making project documentation inconsistent post-upgrade.

README.md[1-10]
CONTRIBUTING.md[111-116]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
CONTRIBUTING.md still shows a Java Version 11 badge even though the project now requires Java 21+.

## Issue Context
README.md was updated to state the new minimum Java version.

## Fix Focus Areas
- CONTRIBUTING.md[111-116]
- README.md[1-10]

## Suggested change
Update the badge URL in CONTRIBUTING.md to reflect Java 21 (change the `/11/` portion of the badgen URL to `/21/`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment thread pom.xml
@soul2zimate
soul2zimate marked this pull request as draft April 1, 2026 01:08
@soul2zimate

Copy link
Copy Markdown
Contributor Author

@ruromero Could you go to Settings → Branches → Branch protection rules → main → Edit to remove the required job rule for Build and test Java 17 Thanks.

@ruromero

ruromero commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

Could you go to Settings → Branches → Branch protection rules → main → Edit to remove the required job rule for Build and test Java 17 Thanks.

I can't but I have asked one of the Org maintainers

@ruromero ruromero left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All looks good

Comment thread .github/workflows/integration.yml Outdated
…ava 21

- Point integration workflow to soul2zimate/exhort-integration-tests
  which has Java 21 configured
- Update Maven Enforcer requireJavaVersion from [11,) to [21,)
- Update Java version badge in CONTRIBUTING.md from 11 to 21

Implements TC-3969

Assisted-by: Claude Code
@soul2zimate
soul2zimate marked this pull request as ready for review April 1, 2026 10:17
@soul2zimate
soul2zimate merged commit 7d88afb into guacsec:main Apr 1, 2026
34 of 38 checks passed
@soul2zimate
soul2zimate deleted the TC-3969 branch April 1, 2026 10:19
@qodo-code-review

qodo-code-review Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Enforcer JDK mismatch🐞 Bug ☼ Reliability
Description
pom.xml now compiles with maven.compiler.release=21, but the Maven Enforcer rule still allows Java
[11,), so builds on JDK 11–20 will pass validate and then fail later during compilation with a
less actionable error.
Code

pom.xml[19]

+    <maven.compiler.release>21</maven.compiler.release>
Evidence
The project is configured to compile for Java 21, but the enforcer rule does not enforce Java 21+
and will accept older JDKs, causing late-stage compilation failures instead of an early, clear
validation failure.

pom.xml[14-21]
pom.xml[610-636]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The build is configured for Java 21 bytecode (`maven.compiler.release=21`), but Maven Enforcer still permits running Maven with JDK 11–20 (`requireJavaVersion` is `[11,)`). This causes validation to succeed and compilation to fail later with a less helpful error.

## Issue Context
With `maven.compiler.release=21`, compiling requires JDK 21+.

## Fix Focus Areas
- pom.xml[610-636]
- pom.xml[14-21]

## Suggested change
Update the enforcer rule to require Java 21+ (e.g., `<version>[21,)</version>`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Contributing badge outdated🐞 Bug ⚙ Maintainability
Description
README now states Java 21 is required, but CONTRIBUTING.md still advertises a Java Version 11 badge,
which misleads contributors about prerequisites.
Code

README.md[R6-7]

+**Requires Java 21 or later.**
+
Evidence
The README explicitly declares Java 21+ as the minimum, while CONTRIBUTING.md’s badge link still
points to Java Version 11, making project documentation inconsistent post-upgrade.

README.md[1-10]
CONTRIBUTING.md[111-116]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
CONTRIBUTING.md still shows a Java Version 11 badge even though the project now requires Java 21+.

## Issue Context
README.md was updated to state the new minimum Java version.

## Fix Focus Areas
- CONTRIBUTING.md[111-116]
- README.md[1-10]

## Suggested change
Update the badge URL in CONTRIBUTING.md to reflect Java 21 (change the `/11/` portion of the badgen URL to `/21/`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants