Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public record InterviewResultResponse(
Integer userCurScore,
Integer userPrevScore,
InterviewMode interviewMode,
Boolean includeLiveCoding,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

includeLiveCoding 필드는 항상 interview.isLiveCoding()(기본형 boolean 반환)을 통해 설정되므로 null이 될 가능성이 없습니다. 불필요한 박싱/언박싱 오버헤드를 방지하고 NullPointerException 발생 가능성을 원천 차단하기 위해 래퍼 클래스인 Boolean 대신 기본형 boolean 타입을 사용하는 것을 권장합니다.

Suggested change
Boolean includeLiveCoding,
boolean includeLiveCoding,

List<RootQuestionReferenceAnswer> rootQuestionReferenceAnswers
) {

Expand All @@ -44,6 +45,7 @@ public static InterviewResultResponse createMine(
member.getScore(),
member.getScore() - interview.getTotalScore(),
interview.getInterviewMode(),
interview.isLiveCoding(),
rootQuestionReferenceAnswers
);
}
Expand All @@ -66,6 +68,7 @@ public static InterviewResultResponse createMineForGuest(
null,
null,
interview.getInterviewMode(),
interview.isLiveCoding(),
rootQuestionReferenceAnswers
);
}
Expand Down Expand Up @@ -98,6 +101,7 @@ public static InterviewResultResponse createOfOtherMemberForAuthorized(
null,
null,
interview.getInterviewMode(),
interview.isLiveCoding(),
null
);
}
Expand Down Expand Up @@ -128,6 +132,7 @@ public static InterviewResultResponse createOfOtherMemberForUnauthorized(
null,
null,
interview.getInterviewMode(),
interview.isLiveCoding(),
null
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ static InterviewCheckResponse createFinished(Interview interview, List<Question>
createPrevQuestionAndAnswers(answers),
questions.size(),
interview.getMaxQuestionCount(),
interview.isGuestInterview()
interview.isGuestInterview(),
interview.isLiveCoding()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public record InterviewCheckTextModeResponse(
String curQuestion,
Integer curQuestionCount,
Integer maxQuestionCount,
Boolean isDemo
Boolean isDemo,
Boolean includeLiveCoding

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

includeLiveCoding 필드는 항상 interview.isLiveCoding()을 통해 설정되므로 null이 될 가능성이 없습니다. 불필요한 박싱/언박싱 오버헤드를 방지하고 NullPointerException 발생 가능성을 원천 차단하기 위해 래퍼 클래스인 Boolean 대신 기본형 boolean 타입을 사용하는 것을 권장합니다.

Suggested change
Boolean includeLiveCoding
boolean includeLiveCoding

) implements InterviewCheckResponse {

public static InterviewCheckResponse of(Interview interview, List<Question> questions, List<Answer> answers) {
Expand All @@ -34,7 +35,8 @@ private static InterviewCheckResponse createInProgress(Interview interview, List
curQuestion.getContent(),
questions.size(),
interview.getMaxQuestionCount(),
interview.isGuestInterview()
interview.isGuestInterview(),
interview.isLiveCoding()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public record InterviewCheckVoiceModeResponse(
String curQuestionVoiceUrl,
Integer curQuestionCount,
Integer maxQuestionCount,
Boolean isDemo
Boolean isDemo,
Boolean includeLiveCoding

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

includeLiveCoding 필드는 항상 interview.isLiveCoding()을 통해 설정되므로 null이 될 가능성이 없습니다. 불필요한 박싱/언박싱 오버헤드를 방지하고 NullPointerException 발생 가능성을 원천 차단하기 위해 래퍼 클래스인 Boolean 대신 기본형 boolean 타입을 사용하는 것을 권장합니다.

Suggested change
Boolean includeLiveCoding
boolean includeLiveCoding

) implements InterviewCheckResponse {

public static InterviewCheckResponse of(Interview interview, List<Question> questions, List<Answer> answers, String curQuestionVoiceUrl) {
Expand All @@ -39,7 +40,8 @@ private static InterviewCheckResponse createInProgress(
curQuestionVoiceUrl,
questions.size(),
interview.getMaxQuestionCount(),
interview.isGuestInterview()
interview.isGuestInterview(),
interview.isLiveCoding()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public record InterviewFinishedCheckResponse(
List<QuestionAndAnswerResponse> prevQuestionsAndAnswers,
Integer curQuestionCount,
Integer maxQuestionCount,
Boolean isDemo
Boolean isDemo,
Boolean includeLiveCoding

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

includeLiveCoding 필드는 항상 interview.isLiveCoding()을 통해 설정되므로 null이 될 가능성이 없습니다. 불필요한 박싱/언박싱 오버헤드를 방지하고 NullPointerException 발생 가능성을 원천 차단하기 위해 래퍼 클래스인 Boolean 대신 기본형 boolean 타입을 사용하는 것을 권장합니다.

Suggested change
Boolean includeLiveCoding
boolean includeLiveCoding

) implements InterviewCheckResponse {
}
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class InterviewControllerTest extends BaseControllerTest {
"cur_question_count": %d,
"max_question_count": %d,
"is_demo": false,
"include_live_coding": false,
"prev_questions_and_answers": [
{
"question_id": %d,
Expand Down Expand Up @@ -283,6 +284,7 @@ class InterviewControllerTest extends BaseControllerTest {
fieldWithPath("cur_question_count").description("현재까지 받은 질문 개수"),
fieldWithPath("max_question_count").description("최대 질문 개수"),
fieldWithPath("is_demo").description("비회원 체험 면접 여부"),
fieldWithPath("include_live_coding").description("라이브 코테 면접 여부"),
fieldWithPath("prev_questions_and_answers").description("이전 질문과 답변 목록"),
fieldWithPath("prev_questions_and_answers[].question_id").description("이전 질문 ID"),
fieldWithPath("prev_questions_and_answers[].question").description("이전 질문 내용"),
Expand Down Expand Up @@ -317,6 +319,7 @@ class InterviewControllerTest extends BaseControllerTest {
"cur_question_count": %d,
"max_question_count": %d,
"is_demo": false,
"include_live_coding": false,
"prev_questions_and_answers": [
{
"question_id": %d,
Expand Down Expand Up @@ -352,6 +355,7 @@ class InterviewControllerTest extends BaseControllerTest {
fieldWithPath("cur_question_count").description("현재까지 받은 질문 개수"),
fieldWithPath("max_question_count").description("최대 질문 개수"),
fieldWithPath("is_demo").description("비회원 체험 면접 여부"),
fieldWithPath("include_live_coding").description("라이브 코테 면접 여부"),
fieldWithPath("prev_questions_and_answers").description("이전 질문과 답변 목록"),
fieldWithPath("prev_questions_and_answers[].question_id").description("이전 질문 ID"),
fieldWithPath("prev_questions_and_answers[].question").description("이전 질문 내용"),
Expand Down Expand Up @@ -391,6 +395,7 @@ class InterviewControllerTest extends BaseControllerTest {
"cur_question_count": %d,
"max_question_count": %d,
"is_demo": false,
"include_live_coding": false,
"prev_questions_and_answers": [
{
"question_id": %d,
Expand Down Expand Up @@ -437,6 +442,7 @@ class InterviewControllerTest extends BaseControllerTest {
fieldWithPath("cur_question_count").description("현재까지 받은 질문 개수"),
fieldWithPath("max_question_count").description("최대 질문 개수"),
fieldWithPath("is_demo").description("비회원 체험 면접 여부"),
fieldWithPath("include_live_coding").description("라이브 코테 면접 여부"),
fieldWithPath("prev_questions_and_answers").description("이전 질문과 답변 목록"),
fieldWithPath("prev_questions_and_answers[].question_id").description("이전 질문 ID"),
fieldWithPath("prev_questions_and_answers[].question").description("이전 질문 내용"),
Expand Down Expand Up @@ -1008,6 +1014,7 @@ class InterviewControllerTest extends BaseControllerTest {
"user_cur_score": 70,
"user_prev_score": 100,
"interview_mode": "TEXT",
"include_live_coding": false,
"root_question_reference_answers": [
{
"nickname": "김철수",
Expand Down Expand Up @@ -1063,6 +1070,7 @@ class InterviewControllerTest extends BaseControllerTest {
fieldWithPath("user_cur_score").description("현재 사용자 점수"),
fieldWithPath("user_prev_score").description("이전 사용자 점수"),
fieldWithPath("interview_mode").description("인터뷰 모드 (TEXT, VOICE)"),
fieldWithPath("include_live_coding").description("라이브 코테 면접 여부"),
fieldWithPath("root_question_reference_answers").description(
"루트 질문에 대한 다른 사용자의 우수 답변 목록 (최대 3개)"),
fieldWithPath("root_question_reference_answers[].nickname").description("답변자 닉네임"),
Expand Down Expand Up @@ -1167,7 +1175,8 @@ class InterviewControllerTest extends BaseControllerTest {
"interviewee_nickname": "오상훈",
"total_member_count": 2,
"interviewee_rank": 1,
"interview_mode": "TEXT"
"interview_mode": "TEXT",
"include_live_coding": false
}
""";

Expand Down Expand Up @@ -1202,7 +1211,8 @@ class InterviewControllerTest extends BaseControllerTest {
fieldWithPath("interviewee_nickname").description("면접자 닉네임"),
fieldWithPath("total_member_count").description("전체 회원 수"),
fieldWithPath("interviewee_rank").description("면접자 등수"),
fieldWithPath("interview_mode").description("인터뷰 모드 (TEXT, VOICE)")
fieldWithPath("interview_mode").description("인터뷰 모드 (TEXT, VOICE)"),
fieldWithPath("include_live_coding").description("라이브 코테 면접 여부")
)
));
}
Expand Down Expand Up @@ -1290,7 +1300,8 @@ class InterviewControllerTest extends BaseControllerTest {
"interviewee_nickname": "오상훈",
"total_member_count": 1,
"interviewee_rank": 1,
"interview_mode": "TEXT"
"interview_mode": "TEXT",
"include_live_coding": false
}
""";

Expand Down Expand Up @@ -1323,7 +1334,8 @@ class InterviewControllerTest extends BaseControllerTest {
fieldWithPath("interviewee_nickname").description("면접자 닉네임"),
fieldWithPath("total_member_count").description("전체 회원 수"),
fieldWithPath("interviewee_rank").description("면접자 등수"),
fieldWithPath("interview_mode").description("인터뷰 모드 (TEXT, VOICE)")
fieldWithPath("interview_mode").description("인터뷰 모드 (TEXT, VOICE)"),
fieldWithPath("include_live_coding").description("라이브 코테 면접 여부")
)
));
}
Expand Down Expand Up @@ -1468,7 +1480,8 @@ class InterviewControllerTest extends BaseControllerTest {
],
"total_feedback": "기본 개념을 잘 정리해보세요.",
"total_score": -10,
"interview_mode": "TEXT"
"interview_mode": "TEXT",
"include_live_coding": false
}
""";

Expand Down Expand Up @@ -1502,6 +1515,7 @@ class InterviewControllerTest extends BaseControllerTest {
fieldWithPath("total_feedback").description("인터뷰 총 피드백"),
fieldWithPath("total_score").description("인터뷰 총 점수"),
fieldWithPath("interview_mode").description("인터뷰 모드 (TEXT, VOICE)"),
fieldWithPath("include_live_coding").description("라이브 코테 면접 여부"),
fieldWithPath("root_question_reference_answers").description(
"루트 질문에 대한 다른 사용자의 우수 답변 목록 (최대 3개)")
)
Expand Down
Loading