Skip to content

Upgrade to Java 21 - #378

Open
devin-ai-integration[bot] wants to merge 1 commit into
DevOpsfrom
devin/1794556568-java-21-upgrade
Open

devin-ai-integration[bot] wants to merge 1 commit into
DevOpsfrom
devin/1794556568-java-21-upgrade

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Summary

Moves build and runtime from Java 17 to Java 21 (LTS). Spring Boot 3.3.3 already supports 21, so no code or dependency changes were needed.

  • pom.xml: java.version 17 → 21. Removed the maven-compiler-plugin 3.8.0 block that pinned source/target to 1.8. The Spring Boot parent's managed compiler plugin now compiles with --release ${java.version}. No other plugin or dependency pins a Java version.
  • Dockerfile: builder maven:3.8.3-openjdk-17 → maven:3.9-eclipse-temurin-21, runtime eclipse-temurin:17-jre-alpine → eclipse-temurin:21-jre-alpine.
  • README.md / README-K8S.md: the Jenkins host install now uses openjdk-21-jre. Jenkins supports Java 21.
  • Nothing to change in Jenkinsfile, vars/, GitOps/, helm/, kubernetes/ or .github/. The pipeline builds through the Dockerfile, and the manifests only reference image tags.

Verification (local, JDK 21.0.13)

  • ./mvnw clean verify: BUILD SUCCESS, Tests run: 1, Failures: 0, Errors: 0.
  • The class files are major version 65 (Java 21).
  • docker build succeeds. java -version inside the image reports Temurin 21.0.13.
  • The app boots on :8080 against MySQL 8. A UI parity recording will be posted as a comment.

Note: Maven Central (repo.maven.apache.org) was returning HTTP 429 on the VM. Local builds used a Google Maven Central mirror through ~/.m2/settings.xml. That setting is local only; this PR does not include any repo changes for it.

Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/bda99ea2eda14e8a9fb988e26e869f31
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/bda99ea2eda14e8a9fb988e26e869f31?variant=devin
Requested by: @joao-cognition


Note

Devin errored when opening this Pull Request as joao-cognition.
As a fallback, Devin opened this PR as itself.


🟢 Devin Review found nothing to fix · View findings

Devin Review

- pom.xml: java.version 21; drop maven-compiler-plugin override pinning source/target 1.8
- Dockerfile: maven:3.9-eclipse-temurin-21 builder, eclipse-temurin:21-jre-alpine runtime
- README/README-K8S: Jenkins host JRE openjdk-21-jre

Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Custom reviewers

  • 🧪 Test 2 reviewer: no findings · View

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Author

Java 21 parity check, run locally on JDK 21.0.13 against MySQL 8 and recorded on screen. The full video is in the Devin session.

  • ./mvnw clean verify: Tests run: 1, Failures: 0, Errors: 0. BUILD SUCCESS.
  • The app started on Java 21, with Tomcat on port 8080.
  • / redirected to /login. Registered two users and logged in as each.
  • Sender balance went $0 → deposit $500 → withdraw $100 → transfer $50 → $350. The recipient shows $50 and the matching incoming transfer.
  • Transaction history matches all three operations. Overdrafting the recipient by $100 is rejected with "Insufficient funds" and leaves the balance unchanged. Logout works.
Build Startup
Build success Tomcat started
Final sender dashboard Transaction history
Sender balance $350 Transaction history

Pre-existing issue, not caused by this PR: the logo on /login and /register is broken. SecurityConfig doesn't permitAll for /images/**, so unauthenticated requests for the image are blocked. The image shows correctly on authenticated pages.

Written by Devin

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants