Skip to content

Migrate from Java 11 to Java 17#511

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1774629273-java17-migration
Open

Migrate from Java 11 to Java 17#511
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1774629273-java17-migration

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot commented Mar 27, 2026

Summary

First step in the broader modernization effort (Java 17 is a prerequisite for the eventual Spring Boot 3.x upgrade). This PR updates the project's Java target from 11 to 17 and bumps dependencies that have known compatibility issues with Java 17's stronger encapsulation (JEP 403).

Changes:

Item From To
Java source/target 11 17
Gradle wrapper 7.4 7.6.4
Spotless plugin 6.2.1 6.25.0
SQLite JDBC 3.36.0.3 3.45.1.0
Lombok (BOM-managed) 1.18.30 (pinned)

All 68 tests pass locally with JDK 17.

Review & Testing Checklist for Human

  • Verify CI pipeline uses JDK 17: The repo's GitHub Actions workflow (.github/workflows/gradle.yml) may reference java-version: '11' — this was not found in the local clone but is referenced in repo documentation. If the workflow exists, it needs to be updated to JDK 17 or CI will fail.
  • Verify no runtime reflection issues: MyBatis mappers, JWT (jjwt), and Spring Security use reflection heavily. Tests passed but edge cases in production payloads could still hit InaccessibleObjectException. Run the app and exercise auth + article CRUD flows manually.
  • Confirm Lombok 1.18.30 pinning doesn't conflict with Spring Boot BOM: Pinning overrides the managed version from spring-boot-starter-parent 2.6.3. Verify annotation processing works correctly (getters/setters/builders generated properly).
  • DGS codegen plugin (5.0.6) was not updated — compilation succeeded, but verify GraphQL code generation and queries work at runtime.
  • README still says "You'll need Java 11 installed" — should be updated to Java 17 for developer onboarding accuracy.

Recommended test plan: Run ./gradlew clean test with JDK 17, then ./gradlew bootRun and exercise the REST API (user registration, login, article CRUD, comments, favorites) and GraphQL endpoint (/graphql) to confirm no runtime issues.

Notes

  • No --add-opens JVM flags were added since no reflective access to JDK internals was found in source code. If runtime issues appear, flags may need to be added to tasks.withType(Test) and the bootRun JVM args.
  • The Netflix DGS codegen plugin was left at 5.0.6 as it compiled and tested successfully with Java 17.

Link to Devin session: https://app.devin.ai/sessions/784d18eb090842c6ab257d17f75ed4e5
Requested by: @sophialyssy-sys


Open with Devin

- Update sourceCompatibility and targetCompatibility from 11 to 17
- Update Spotless plugin from 6.2.1 to 6.25.0 for Java 17 support
- Update SQLite JDBC from 3.36.0.3 to 3.45.1.0 for Java 17 compatibility
- Pin Lombok to 1.18.30 for Java 16+ internal API access support
- Upgrade Gradle wrapper from 7.4 to 7.6.4 for full Java 17 support

Co-Authored-By: sophia.lyssy <sophia.lyssy@windsurf.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

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

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 potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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