fix: resolve top 5 SonarQube issues (weekly sweep) - #1061
Open
choikh0423 wants to merge 1 commit into
Open
choikh0423 wants to merge 1 commit into
choikh0423 wants to merge 1 commit into
Conversation
- java:S1452 x3: return ResponseEntity<Map<String, Object>> instead of ResponseEntity<?> - java:S1948: make InvalidRequestException.errors transient - java:S2885: build a per-call UTC Calendar in DateTimeHandler Co-Authored-By: Kyu Choi <kyuhwanchoi0423@gmail.com>
🤖 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
Weekly SonarQube sweep on
choikh0423_demo-spring-boot-test-coverage(the analysis project for this repo). Ranked all 265 open issues by severity, then type, then effort/recency; no BLOCKER, BUG-severity-CRITICAL, or VULNERABILITY issues exist, so the top 5 are the 4 CRITICAL issues plus the highest-priority MAJOR one (the only MAJOR of type BUG).AZ1u3HCaEnUkF3fpjVtjArticleApi.articleResponseEntity<?>→ResponseEntity<Map<String, Object>>AZ1u3HCaEnUkF3fpjVtkArticleApi.updateArticleAZ1u3HBkEnUkF3fpjVtQCommentsApi.createCommentAZ1u3HBdEnUkF3fpjVtNSerializableclassInvalidRequestException.errorstransient(Spring'sErrorsis not serializable; the exception is never deserialized)AZ1u3HAmEnUkF3fpjVtCDateTimeHandler.UTC_CALENDARCalendarwas handed to JDBC from a singleton MyBatis type handler; replaced by a per-call instanceThe three
ResponseEntity<?>methods already returned only theMap<String, Object>produced by their private*Responsehelpers, so the narrowed return type is source- and wire-compatible../gradlew testpasses../gradlew spotlessCheckreports no violations in the touched files; it does flag one pre-existing formatting violation insrc/test/java/io/spring/infrastructure/service/DefaultJwtServiceTest.java, which is present onmasterand left untouched here. Running Spotless on this box also requires--add-exports=jdk.compiler/...JVM args because only JDK 17 is installed while google-java-format 1.13 (Spotless 6.2.1) needs JDK 11 internals access.Link to Devin session: https://app.devin.ai/sessions/96fed63ba703472fa149ad69ab921c2a
Open in Devin Desktop: https://app.devin.ai/desktop/session/96fed63ba703472fa149ad69ab921c2a?variant=devin
Requested by: @choikh0423
Devin Review