Skip to content

Build with Java 17 - #1067

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1788367343-java17
Open

devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1788367343-java17

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Moves the build to Java 17: sourceCompatibility/targetCompatibility '11' -> '17'. No production code changes were needed — Spring Boot 2.6.3, Gradle 7.4 and all dependencies (MyBatis, DGS, joda-time, sqlite-jdbc) compile and run as-is on JDK 17.

The only real friction was Spotless: googleJavaFormat() reflects into jdk.compiler internals, which JEP 396/403 strong encapsulation blocks on JDK 16+, so spotlessJava failed with IllegalAccessError: ... cannot access class com.sun.tools.javac.parser.Tokens$TokenKind. Fixed by adding a gradle.properties that gives the Gradle daemon (where Spotless runs in-process) the needed exports rather than bumping the plugin/formatter versions:

org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.{api,file,parser,tree,util}=ALL-UNNAMED

With Spotless actually running again it flagged one pre-existing formatting violation in DefaultJwtServiceTest, applied here via spotlessApply.

Verified locally on OpenJDK 17.0.13: ./gradlew clean build succeeds and all 68 tests pass (0 failures/errors), including the @WebMvcTest API tests, MyBatis persistence tests and context startup.

Link to Devin session: https://app.devin.ai/sessions/6698c41bd3904f85828cfdab96ddd2ea
Open in Devin Desktop: https://app.devin.ai/desktop/session/6698c41bd3904f85828cfdab96ddd2ea?variant=devin
Requested by: @izancoomontesuarez


Note

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


Devin Review

Co-Authored-By: Izan Coomonte <izancoomonte@gmail.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, 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 found 0 potential issues.

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