Skip to content
Merged
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 @@ -13,7 +13,7 @@ public static String formatExamNumber(Integer roundCode, Integer areaCode, Integ
}

return String.format(
"%d%02d%02d%04d",
"%d%d%02d%04d",

Choose a reason for hiding this comment

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

high

지역 코드(areaCode)의 포맷을 %02d에서 %d로 변경하셨습니다. 이로 인해 areaCode가 한 자릿수일 경우 0으로 채워지지 않아 수험 번호의 길이가 달라지게 됩니다.

schoolCode%02d, personalCode%04d로 고정 길이 포맷을 유지하고 있는데, areaCode만 가변 길이로 변경하면 포맷의 일관성이 깨집니다.

더 중요한 점은, roundCodeareaCode가 모두 패딩 없이 %d로 포맷될 경우, 두 값을 구분하기 어려워져 모호함이 발생할 수 있습니다. 예를 들어, roundCode=1, areaCode=23인 경우와 roundCode=12, areaCode=3인 경우 모두 123...으로 시작하여 동일한 수험 번호 앞자리를 생성할 수 있습니다.

따라서 수험 번호의 명확성과 일관성을 위해 areaCode의 포맷을 다시 %02d로 복원하는 것을 강력히 권장합니다.

Suggested change
"%d%d%02d%04d",
"%d%02d%02d%04d",

roundCode,
areaCode,
schoolCode,
Expand Down
Loading