Skip to content

refactor : getProblems#398

Merged
sh0723 merged 9 commits intodevelopfrom
refactor/be-41
Sep 21, 2025
Merged

refactor : getProblems#398
sh0723 merged 9 commits intodevelopfrom
refactor/be-41

Conversation

@sh0723
Copy link
Contributor

@sh0723 sh0723 commented Aug 26, 2025

📌 Related Issue

be-41

🚀 Description

  • 기존에 존재하던 IN_PROGRESS, EXPIRED, QUEUED, DEADLINE_REACHED 를 하나로 통합하며, DEADLINE_REACHED 이 부분은 앞으로 필요없다하여 삭제했습니다!

📢 Review Point

  • 잘모르겠지만.. 보다가 짚어주고싶은 부분들 짚어주세요!

📚Etc (선택)

@sh0723 sh0723 self-assigned this Aug 26, 2025
@sh0723 sh0723 added the refactoring 리팩토링 label Aug 26, 2025
@linear
Copy link

linear bot commented Aug 26, 2025

@channeltalk
Copy link

channeltalk bot commented Aug 26, 2025

@sh0723 sh0723 requested review from rladmstn and s-hwan and removed request for rladmstn and s-hwan August 26, 2025 03:29
@github-actions
Copy link

github-actions bot commented Aug 26, 2025

Test Results

 19 files   19 suites   6s ⏱️
318 tests 318 ✅ 0 💤 0 ❌
320 runs  320 ✅ 0 💤 0 ❌

Results for commit e2e3222.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@rladmstn rladmstn left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!
코멘트 확인해주세요~

Comment on lines +75 to +79
if (status == ProblemListStatus.IN_PROGRESS) {
if (unsolvedOnly == null) {
throw new InvalidRequestException(HttpStatus.BAD_REQUEST, "IN_PROGRESS 상태에서는 unsolvedOnly 는 필수입니다.");
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

개인적으로는 IN_PROGRESS 상태에 대해서 unsolvedOnly 값이 null로 들어오면 unsolvedOnly=false라는 것과 동일한 의미라고 생각이 드는데요! 그래서 위 부분에 대한 검증이 없어도 되지 않을까 싶었습니다. 어떻게 생각하시나요?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

음 이 unsolvedOnly가 이후에서 findAllInProgressProblem 이 쿼리부분에서 사용되어서요! null로 들어오면 NPE가 발생해서 검증을 걸어둔거긴해요.
사실 말한거에 동의하기는 해서 서비스 로직부분에서 null 인경우 false로 바꾸도록 할까요?

Copy link
Contributor

Choose a reason for hiding this comment

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

저는 서비스계층에서 false로 변경해도 될 것 같아보입니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 그렇게 할게요~!

this.status = status;
this.error = error;
}
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

마지막 줄 개행 추가 부탁합니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

예외 객체 record로 만들면 편하게 쓸 수 있을 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

record를 사용한 것에 이점이 뭘까요?! 어처피 지금 구현하는 예외 객체들은 대부분 status, error로 단순하게 사용하니까 record로 관리하는게 편한건가? record사용시 확장성은 잃는다고해서요..!!

Copy link
Contributor

Choose a reason for hiding this comment

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

저는 그냥 생성자, getter 명시가 없어도 되어지니, 이렇게 불변적인 클래스는 웬만하면 record로 만들어서 간결함을 유지하려고 하는 편입니다!
확장성은 예외 객체에서는 고려하지 않아도 된다고 생각해요. BaseException 같은 객체면 모르겠지만, 이런 상세 경우에 대한 Exception 객체는 확장할 경우가 없다고 생각해서요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 다음 예외 클래스 만들때마다 record로 만들게요! 이거 만든게 필요없어져서 삭제했습니다

Copy link
Contributor

@rladmstn rladmstn left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 👍

Copy link
Contributor

@junggyo1020 junggyo1020 left a comment

Choose a reason for hiding this comment

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

고생많으셨습니다 :)

Copy link
Contributor

@s-hwan s-hwan left a comment

Choose a reason for hiding this comment

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

고생하셨습니당 👍

@sh0723 sh0723 merged commit e0b2c16 into develop Sep 21, 2025
2 checks passed
hwangjokim pushed a commit that referenced this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants