fix: reactive ConstraintValidator 8종 null 입력 NullPointerException 방지#276
Open
z3rotig4r wants to merge 1 commit into
Open
fix: reactive ConstraintValidator 8종 null 입력 NullPointerException 방지#276z3rotig4r wants to merge 1 commit into
z3rotig4r wants to merge 1 commit into
Conversation
reactive validation 패키지의 ConstraintValidator 구현 중 8종 (Cn·Crn·Rrn·MobilePhone·Phone·English·Korean·Pwd Check)이 isValid 진입부에서 value.replaceAll(...) 또는 PATTERN.matcher(value)를 널 체크 없이 호출해, 검증 대상 필드가 null이면 NullPointerException이 발생했다. 같은 패키지의 EgovEmailCheckValidation·EgovIPCheckValidation·EgovNullCheckValidation은 이미 null을 안전하게 처리한다. 형제 클래스와 동일하게 각 isValid 진입부에 null이면 false를 반환하는 가드를 추가한다. 8종 검증기가 null 입력에서 예외 없이 false를 반환하는지, 정상 입력 판정은 유지되는지 검증하는 테스트 추가(수정 전 NPE 재현).
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.
문제
reactive validation 패키지의
ConstraintValidator구현 중 8종(
EgovCnCheckValidation·EgovCrnCheckValidation·EgovRrnCheckValidation·EgovMobilePhoneCheckValidation·EgovPhoneCheckValidation·EgovEnglishCheckValidation·EgovKoreanCheckValidation·EgovPwdCheckValidation)이isValid진입부에서value.replaceAll(...)또는PATTERN.matcher(value)를 널 체크 없이 호출합니다. 검증 대상 필드가null이면NullPointerException이 발생합니다.같은 패키지의
EgovEmailCheckValidation·EgovIPCheckValidation·EgovNullCheckValidation은 이미null을 안전하게 처리하고 있어 내부 정책이 일관되지 않습니다.수정
형제 클래스와 동일하게 각
isValid진입부에null이면false를 반환하는 가드를 추가했습니다.검증
8종 검증기가
null입력에서 예외 없이false를 반환하는지, 정상 입력 판정은 유지되는지 검증하는 단위 테스트를 추가했습니다(수정 전에는NullPointerException재현).