Skip to content

Conversation

@Hank-Choi
Copy link
Member

jackson 2.x버전에서는 FAIL_ON_NULL_FOR_PRIMITIVES 옵션이 default false였으나 3.x 부터 true로 변경됨
이 옵션이 true일 때 kotlin과 함께 사용하면 jackson 코틀린 모듈보다 null 체크가 먼저 들어가기 때문에 kotlin 에서 기본값을 설정해줘도 그 전에 터짐

ex)

data class SnuMapSearchItem(
    @param:JsonProperty("lat_val1")
    val latitudeInDecimal: Double = 0.0,
)

해당 클래스로 lat_val1이 없는 json 읽을 시 null 체크

해당 옵션 false로 변경

@Hank-Choi Hank-Choi requested review from a team and PFCJeong as code owners January 8, 2026 06:09
@Hank-Choi Hank-Choi requested review from asp345, davin111 and eastshine2741 and removed request for a team January 8, 2026 06:09
@Hank-Choi Hank-Choi merged commit 3adf143 into develop Jan 8, 2026
2 checks passed
@Hank-Choi Hank-Choi deleted the fix/jackson-kotlin-error branch January 8, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants