fix : NoticeMessageDto ID 형식 String으로 변경#348
Conversation
WalkthroughNoticeMessageDto의 id 필드 타입을 Long에서 String으로 변경했습니다. 빌더 생성자 매개변수와 팩토리 메서드(from)에서 id 값을 String으로 변환하도록 업데이트했으며, 임포트 문을 명시적으로 지정했습니다. Changes
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/java/com/kustacks/kuring/message/application/port/out/dto/NoticeMessageDto.java (1)
32-33: String 타입에 적합한 유효성 검증 사용 권장
id타입이String으로 변경되었으므로,Assert.notNull대신Assert.hasText를 사용하는 것이 더 적절합니다. 현재 검증은 빈 문자열("")을 허용하며, 에러 메시지("must not be empty")와 실제 검증 로직이 일치하지 않습니다.♻️ 권장 수정안
`@Builder` private NoticeMessageDto(String id, String articleId, String postedDate, String subject, String category, String categoryKorName, String baseUrl) { - Assert.notNull(id, "id must not be empty"); + Assert.hasText(id, "id must not be empty"); Assert.notNull(articleId, "articleId must not be null");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/kustacks/kuring/message/application/port/out/dto/NoticeMessageDto.java` around lines 32 - 33, The constructor NoticeMessageDto(String id, String articleId, String postedDate, String subject, String category, String categoryKorName, String baseUrl) currently uses Assert.notNull(id, "id must not be empty") which allows empty strings; replace that check with Assert.hasText(id, "id must not be empty") (and similarly update any other String validations in this constructor if they use notNull) so the validation rejects blank/empty id values and the message aligns with the check.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@src/main/java/com/kustacks/kuring/message/application/port/out/dto/NoticeMessageDto.java`:
- Around line 32-33: The constructor NoticeMessageDto(String id, String
articleId, String postedDate, String subject, String category, String
categoryKorName, String baseUrl) currently uses Assert.notNull(id, "id must not
be empty") which allows empty strings; replace that check with
Assert.hasText(id, "id must not be empty") (and similarly update any other
String validations in this constructor if they use notNull) so the validation
rejects blank/empty id values and the message aligns with the check.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/java/com/kustacks/kuring/message/application/port/out/dto/NoticeMessageDto.java
#️⃣ 이슈
📌 요약
🛠️ 상세
💬 기타