Conversation
개요GetAlarmDto의 from(UserAnnouncement) 메서드에서 id 값의 출처를 announcement.getId()에서 userAnnouncement.getId()로 변경했습니다. 다른 모든 필드는 기존 매핑을 유지합니다. 변경 사항
예상 코드 리뷰 소요 시간🎯 1 (Trivial) | ⏱️ ~3분 추천 리뷰어
시
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java (1)
33-33:getAnnouncement()중복 호출 제거 권장Line 29에서 이미
announcement로컬 변수에 할당했음에도 Line 33에서userAnnouncement.getAnnouncement()를 재호출하고 있습니다. 일관성과 가독성을 위해 로컬 변수를 재사용하는 것이 좋습니다.♻️ 중복 호출 제거 제안
- .alarmCategory(userAnnouncement.getAnnouncement().getAlarmType().getAlarmCategory()) + .alarmCategory(announcement.getAlarmType().getAlarmCategory())🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java` at line 33, GetAlarmDto builder is re-calling userAnnouncement.getAnnouncement() even though a local variable announcement was already assigned; replace the duplicate call in the builder chain (the .alarmCategory(...) argument) with the existing announcement local variable to use the cached reference (i.e., change .alarmCategory(userAnnouncement.getAnnouncement().getAlarmType().getAlarmCategory()) to use announcement.getAlarmType().getAlarmCategory()) so the code is consistent and avoids redundant calls.
🤖 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/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java`:
- Line 33: GetAlarmDto builder is re-calling userAnnouncement.getAnnouncement()
even though a local variable announcement was already assigned; replace the
duplicate call in the builder chain (the .alarmCategory(...) argument) with the
existing announcement local variable to use the cached reference (i.e., change
.alarmCategory(userAnnouncement.getAnnouncement().getAlarmType().getAlarmCategory())
to use announcement.getAlarmType().getAlarmCategory()) so the code is consistent
and avoids redundant calls.
Test Results 38 files 38 suites 12s ⏱️ Results for commit fd1a752. |



#️⃣ 연관된 이슈
closes #441
📝작업 내용
작업 상세 내용
상세 내용을 입력해주세요.
💬리뷰 요구사항
Summary by CodeRabbit
Bug Fixes