Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new code field to the ApiResponse class, updating its static factory methods to populate this field using a new default getCode() method defined in the ResponseCode interface. Additionally, local variables for email and nickname are extracted in VacancyLoadTestTokenGenerator to simplify the builder pattern. The reviewer suggested making the fields of ApiResponse final to ensure immutability and enhance thread safety.
Comment on lines
11
to
14
| private int status; | ||
| private String code; | ||
| private String message; | ||
| private T data; |
Contributor
There was a problem hiding this comment.
API 응답을 표현하는 ApiResponse 클래스는 불변(Immutable) 객체로 설계하는 것이 안전합니다. 현재 필드들이 final로 선언되어 있지 않아 외부에서 변경될 여지가 있습니다. 필드들을 final로 선언하여 객체의 불변성을 보장하고 안정성을 높이는 것을 권장합니다.
Suggested change
| private int status; | |
| private String code; | |
| private String message; | |
| private T data; | |
| private final int status; | |
| private final String code; | |
| private final String message; | |
| private final T data; |
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.
📢 기능 설명
grafan에서 상태코드 수집 가능하도록 수정