Open
Conversation
javajigi
requested changes
Oct 17, 2022
Collaborator
javajigi
left a comment
There was a problem hiding this comment.
WAS 2, 3, 4단계를 한번에 구현했네요. 👍
전체적인 객체 구조에 대해서는 특별히 피드백할 내용은 없는데요.
특정 클래스에 인스턴스 변수가 너무 많아 피드백 남겼어요.
이 객체를 더 작은 단위의 객체로 분리해 보면 좋겠어요.
| private Map<String, Object> attributes; | ||
| private Map<String, Cookie> cookies; | ||
| private HttpVersion httpVersion; | ||
| private ByteBuffer inputChannel; |
Collaborator
There was a problem hiding this comment.
인스턴스 변수의 수가 너무 많다.
관련있는 인스턴스 변수를 묶어 새로운 객체로 분리하는 것은 어떨까?
인스턴스 변수의 수는 가능한 적은 수를 유지할 것을 추천
| .entrySet() | ||
| .stream() | ||
| .collect(Collectors.toMap(Map.Entry::getKey, entry -> new Cookie(entry.getKey(), entry.getValue()))); | ||
| } |
Collaborator
There was a problem hiding this comment.
인스턴스 변수의 수가 많다보니 이 객체가 하는 일이 너무 많다.
이 객체가 하는 일을 여러 객체로 분리해 보면 어떨까?
Comment on lines
+15
to
+16
| private MultiValueMap<String, String> headers; | ||
| private final List<Cookie> cookies = new ArrayList<>(); |
Collaborator
There was a problem hiding this comment.
일급 콜렉션을 적용해 보고 일급 콜렉션으로 구현하는 의미를 파악해 본다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
안녕하세요. 리뷰 부탁드립니다.
오랜만에 리뷰요청 드리는 것이라서 세션 구현까지 같이 진행해 보았습니다.