fix: resolve top 5 SonarQube issues (weekly sweep)#622
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
fix: resolve top 5 SonarQube issues (weekly sweep)#622devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- S1948: Make 'errors' field transient in InvalidRequestException (CRITICAL/BUG) - S1452: Replace ResponseEntity<?> wildcard types with explicit types in ArticleApi (CRITICAL/CODE_SMELL) - S1452: Replace ResponseEntity<?> wildcard type with explicit type in CommentsApi (CRITICAL/CODE_SMELL) - S6813: Convert field injection to constructor injection in JwtTokenFilter (MAJOR/RELIABILITY) Co-Authored-By: Kyu Choi <kyuhwanchoi0423@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
Weekly SonarQube code quality sweep resolving the top 5 open issues ranked by severity, type, effort, and recency.
Issues Fixed
AZ1u3HBdEnUkF3fpjVtNInvalidRequestException.javaErrorsfield in serializable exception class (rulejava:S1948)errorsfieldtransientAZ1u3HCaEnUkF3fpjVtjArticleApi.java:36ResponseEntity<?>in return type (rulejava:S1452)ResponseEntity<Map<String, Object>>AZ1u3HCaEnUkF3fpjVtkArticleApi.java:45ResponseEntity<?>in return type (rulejava:S1452)ResponseEntity<Map<String, Object>>AZ1u3HBkEnUkF3fpjVtQCommentsApi.java:41ResponseEntity<?>in return type (rulejava:S1452)ResponseEntity<Map<String, Object>>AZ1u3HCpEnUkF3fpjVtqJwtTokenFilter.java:20-21@Autowiredinstead of constructor injection (rulejava:S6813)WebSecurityConfigaccordinglyReview & Testing Checklist for Human
transientkeyword onInvalidRequestException.errorsdoesn't affect exception handling (it shouldn't — the field is only accessed in-process viagetErrors(), never serialized)ResponseEntity<Map<String, Object>>return types don't break any REST API contract (these are the same runtime types, just more specific at compile time)JwtTokenFilterandWebSecurityConfigdoesn't affect Spring bean wiring — run./gradlew bootRunand test authentication endpointsNotes
./gradlew spotlessCheckfails on master with a pre-existing JVM module access error (IllegalAccessErrorin Google Java Format). This is not related to these changes../gradlew test.choikh0423_demo-spring-boot-test-coverage(265 total open issues; 0 BLOCKER, 4 CRITICAL/HIGH, remainder MEDIUM/LOW).Link to Devin session: https://app.devin.ai/sessions/2672ef386ae44c61b3ac0066ff0995c5
Requested by: @choikh0423
Devin Review