Conversation
|
@codex 한국어로 리뷰 부탁해! |
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| private Predicate getCursorConditionForKeywordSearch(TechArticleSort techArticleSort, Long techArticleId, | ||
| Float score, NumberTemplate<Double> totalScore) { | ||
| if (ObjectUtils.isEmpty(techArticleId) || ObjectUtils.isEmpty(score)) { | ||
| Double score, NumberTemplate<Double> totalScore) { | ||
| if (ObjectUtils.isEmpty(techArticleId)) { | ||
| return null; | ||
| } | ||
|
|
||
| // HIGHEST_SCORE(정확도순)인 경우 스코어 기반 커서 사용 | ||
| if (techArticleSort == TechArticleSort.HIGHEST_SCORE) { | ||
| if (techArticleSort == TechArticleSort.HIGHEST_SCORE || ObjectUtils.isEmpty(techArticleSort)) { | ||
| return totalScore.lt(score.doubleValue()) | ||
| .or(totalScore.eq(score.doubleValue()) |
There was a problem hiding this comment.
[P1] score 누락 시 커서 조건에서 null 처리 추가
키워드 조회 커서 조건 생성 로직이 techArticleSort가 정확도순(또는 null)일 때 score.doubleValue()를 바로 호출하도록 변경되었습니다. 기존에는 score가 없으면 조건 자체를 생성하지 않아도 요청이 성공했지만, 이제 다음 페이지 요청이 techArticleId만 포함하고 score는 누락된 경우(이전 클라이언트나 잘못된 호출) NullPointerException이 발생해 500 응답이 내려갑니다. score 값이 필수라면 컨트롤러에서 명시적으로 검증하거나 이 메서드에서 null을 허용하도록 기존의 방어 로직을 유지해야 합니다.
Useful? React with 👍 / 👎.
📝 작업 내용
🔗 참고할만한 자료(선택)
💬 리뷰 요구사항(선택)