Skip to content

fix: resolve top 5 SonarQube issues (weekly sweep)#601

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1779138449-sonarqube-weekly-sweep
Open

fix: resolve top 5 SonarQube issues (weekly sweep)#601
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1779138449-sonarqube-weekly-sweep

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 18, 2026

Summary

Weekly SonarQube code quality sweep resolving the top 5 open issues ranked by severity → type → effort → recency.

Issues Fixed

# SonarQube Key Severity Type Rule File Fix
1 AZ1u3HBdEnUkF3fpjVtN CRITICAL BUG java:S1948 InvalidRequestException.java Added transient to non-serializable Errors field in Serializable class
2 AZ1u3HCaEnUkF3fpjVtj CRITICAL CODE_SMELL java:S1452 ArticleApi.java:36 Replaced ResponseEntity<?> with ResponseEntity<Map<String, Object>>
3 AZ1u3HCaEnUkF3fpjVtk CRITICAL CODE_SMELL java:S1452 ArticleApi.java:45 Replaced ResponseEntity<?> with ResponseEntity<Map<String, Object>>
4 AZ1u3HBkEnUkF3fpjVtQ CRITICAL CODE_SMELL java:S1452 CommentsApi.java:41 Replaced ResponseEntity<?> with ResponseEntity<Map<String, Object>>
5 AZ1u3HAmEnUkF3fpjVtC MAJOR BUG java:S2885 DateTimeHandler.java Replaced non-thread-safe static Calendar with static TimeZone + local Calendar.getInstance() calls

Additionally, spotlessApply auto-formatted one line in DefaultJwtServiceTest.java (pre-existing formatting issue).

Review & Testing Checklist for Human

  • Verify DateTimeHandler change doesn't affect timestamp handling — the Calendar.getInstance(UTC_TIMEZONE) creates identical UTC calendars each call, just thread-safe now
  • Verify ResponseEntity<Map<String, Object>> return types don't break any client-side deserialization expectations
  • Run ./gradlew test locally to confirm all 68 tests pass

Notes

  • SonarQube project key: choikh0423_demo-spring-boot-test-coverage
  • All changes are minimal and focused — no behavioral changes, only type-safety and thread-safety improvements
  • spotlessCheck and full test suite (68 tests) pass locally

Link to Devin session: https://app.devin.ai/sessions/92cbe447ffeb41708a91f7df1a6b12ec
Requested by: @choikh0423


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)

- S1948: Make 'errors' field transient in InvalidRequestException (CRITICAL/BUG)
- S1452: Replace ResponseEntity<?> with concrete type in ArticleApi (CRITICAL)
- S1452: Replace ResponseEntity<?> with concrete type in CommentsApi (CRITICAL)
- S2885: Fix non-thread-safe static Calendar in DateTimeHandler (MAJOR/BUG)
- Spotless formatting fix in DefaultJwtServiceTest

Co-Authored-By: Kyu Choi <kyu.choi@cognition.ai>
@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 and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in 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.

1 participant