forked from rehmanmuradali/springboot-java8
-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate to Java 21 / Spring Boot 3.2.5 #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
devin-ai-integration
wants to merge
6
commits into
master
Choose a base branch
from
devin/1777913688-java21-migration-base
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+17
−21
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c8b243a
Java 21 migration: update Gradle build config
devin-ai-integration[bot] 22aa7da
Java 21 migration — Maven build config
devin-ai-integration[bot] afc119b
Java 21 migration: Application.java source changes
devin-ai-integration[bot] 382eabc
Merge PR #20: Java 21 migration — Maven build config
devin-ai-integration[bot] 396bb0c
Merge PR #19: Java 21 migration — Gradle build config
devin-ai-integration[bot] 218ecee
Merge PR #21: Java 21 migration — Application.java source changes
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip | ||
| distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip |
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 New API endpoint response schema doesn't match Quote model, resulting in all-null deserialization
The API URL was changed from the old quoters service to
https://jsonplaceholder.typicode.com/posts/1, but theQuotemodel class was not updated. The JSONPlaceholder endpoint returns{userId, id, title, body}, whileQuote(src/main/java/hello/model/Quote.java:3-34) expectstype(String) andvalue(Value), whereValue(src/main/java/hello/model/Value.java:3-33) expectsid(Long) andquote(String). Since Jackson'sFAIL_ON_UNKNOWN_PROPERTIESdefaults tofalsein Jackson 2.12+, the unknown fields are silently ignored and theQuoteobject is created withtype=nullandvalue=null. This affects both the manualRestTemplatecall inmain()(line 39) and the Spring-managed bean call inrun()(lines 52-53), causing the application to log meaninglessQuote{type='null', value=null}output instead of actual data.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged — this is intentional and matches the original task spec, which permitted "a working placeholder or mock endpoint (e.g.,
https://jsonplaceholder.typicode.com/posts/1or a local stub)" precisely because the originalgturnquist-quoters.cfapps.ioservice is permanently dead. The bot's analysis is correct thatQuotewill deserialize with allnullfields against the JSONPlaceholder response shape.I deliberately did NOT modify the
Quote/Valuemodel classes because:Quoteis only used in two startup-timeRestTemplatecalls that just log the result; they are not part of any user-facing flow.Quote" log line is acceptable as a stub and is explicitly called out in the PR description's testing checklist (item 4).If the team wants real data flowing through
Quoteagain, the right follow-up is one of: (a) add a tiny local@RestControllerstub undersrc/main/java/hello/returning aQuote-shaped JSON payload and point theRestTemplateathttp://localhost:8080/..., or (b) introduce a newPostmodel and switchgetForObjectto use it. Either is a separate, non-migration change.