Skip to content

Comments

INTERNAL: Remove duplicated operation method overrides#885

Merged
jhpark816 merged 1 commit intonaver:developfrom
Jinyshin:refactor/interface-default-methods-#697
Apr 1, 2025
Merged

INTERNAL: Remove duplicated operation method overrides#885
jhpark816 merged 1 commit intonaver:developfrom
Jinyshin:refactor/interface-default-methods-#697

Conversation

@Jinyshin
Copy link
Contributor

@Jinyshin Jinyshin commented Mar 10, 2025

🔗 Related Issue

⌨️ What I did

  • isIdempotentOperation(), isBulkOperation(), isPipeOperation() 메서드의 구현체 대부분이 동일한 반환값을 가지므로 중복된 구현을 제거하고자 BaseOperationImpl 추상 클래스에 공통 구현으로 정리했습니다.
  • 다수의 OperationImpl 구현체들에서 불필요한 메서드 오버라이드를 정리했습니다.

@Jinyshin Jinyshin requested a review from oliviarla March 10, 2025 02:05
@Jinyshin Jinyshin self-assigned this Mar 10, 2025
oliviarla
oliviarla previously approved these changes Mar 11, 2025
@Jinyshin Jinyshin requested a review from jhpark816 March 14, 2025 08:18
@jhpark816 jhpark816 requested a review from brido4125 March 14, 2025 08:29
@jhpark816
Copy link
Collaborator

@brido4125
본 PR에 대해 처음 이슈 제기자이므로, 리뷰하는 것이 좋겠습니다.

Copy link
Collaborator

@jhpark816 jhpark816 left a comment

Choose a reason for hiding this comment

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

리뷰 완료

@Override
public boolean isPipeOperation() {
return false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

질문입니다.
여기에는 isIdempotentOperation() 메소드가 기존에 없었나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이 부분에는 따로 isIdempotentOperation() 메소드가 정의되어 있지 않았지만, 추상클래스인 BaseStoreOperationImpl을 상속하는 모든 클래스에서 Operation 인터페이스의 isIdempotentOperation() 메소드를 Override 하고 있기 때문에 문제되지 않습니다.

@Override
public boolean isIdempotentOperation() {
return true;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기도 기존에 isBulkOperation()과 isPipeOperation() 메소드가 없어도 괜찮았나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

StoreOperationImpl 클래스에서는 isBulkOperation()isPipeOperation()을 따로 정의하지 않아도 BaseStoreOperationImpl 클래스에서 상속하기 때문에 문제되지 않습니다.

brido4125
brido4125 previously approved these changes Mar 14, 2025
@Jinyshin Jinyshin dismissed stale reviews from brido4125 and oliviarla via 4fd8d3b March 26, 2025 05:19
@Jinyshin Jinyshin force-pushed the refactor/interface-default-methods-#697 branch from 8958d09 to 4fd8d3b Compare March 26, 2025 05:19
@Jinyshin Jinyshin changed the title INTERNAL: Refactor Operation interface with default methods INTERNAL: Remove duplicated operation method overrides Mar 26, 2025
@Jinyshin Jinyshin requested review from jhpark816 and oliviarla March 26, 2025 05:31
@jhpark816
Copy link
Collaborator

@oliviarla 먼저 리뷰해 주세요.

oliviarla
oliviarla previously approved these changes Mar 26, 2025
oliviarla
oliviarla previously approved these changes Mar 31, 2025
Copy link
Collaborator

@jhpark816 jhpark816 left a comment

Choose a reason for hiding this comment

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

리뷰 완료

@Override
public boolean isIdempotentOperation() {
return false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

isIdempotentOperation()는 남겨두어야 합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 바로 수정하겠습니다.

@jhpark816
Copy link
Collaborator

@Jinyshin
PR이 3개 commit으로 구성되어 있는데요.
1st commit에 버그가 들어간 상태이고,
3rd commit에서 수정하고 있어서,
전체를 1개 commit으로 merge하여야 할 것 같습니다.

@Jinyshin Jinyshin force-pushed the refactor/interface-default-methods-#697 branch from 14217e2 to dd7cb68 Compare April 1, 2025 01:14
@Jinyshin Jinyshin force-pushed the refactor/interface-default-methods-#697 branch from dd7cb68 to 2692df2 Compare April 1, 2025 01:18
@Jinyshin Jinyshin requested a review from jhpark816 April 1, 2025 01:38
@jhpark816 jhpark816 merged commit 202faed into naver:develop Apr 1, 2025
2 checks passed
@Jinyshin Jinyshin deleted the refactor/interface-default-methods-#697 branch April 7, 2025 09:12
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.

4 participants