Build with Java 17 - #1067
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Build with Java 17#1067devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Izan Coomonte <izancoomonte@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 intojdk.compilerinternals, which JEP 396/403 strong encapsulation blocks on JDK 16+, sospotlessJavafailed withIllegalAccessError: ... cannot access class com.sun.tools.javac.parser.Tokens$TokenKind. Fixed by adding agradle.propertiesthat gives the Gradle daemon (where Spotless runs in-process) the needed exports rather than bumping the plugin/formatter versions:With Spotless actually running again it flagged one pre-existing formatting violation in
DefaultJwtServiceTest, applied here viaspotlessApply.Verified locally on OpenJDK 17.0.13:
./gradlew clean buildsucceeds and all 68 tests pass (0 failures/errors), including the@WebMvcTestAPI 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.