Skip to content

Commit

Permalink
Change Exception and Message
Browse files Browse the repository at this point in the history
  • Loading branch information
k163377 committed Mar 14, 2023
1 parent 54b1110 commit 2a09127
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.fasterxml.jackson.module.kotlin

import com.fasterxml.jackson.databind.JsonMappingException
import com.fasterxml.jackson.databind.MapperFeature
import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.module.kotlin.KotlinFeature.NullIsSameAsDefault
Expand Down Expand Up @@ -57,7 +58,10 @@ class KotlinModule @Deprecated(
init {
if (!KotlinVersion.CURRENT.isAtLeast(1, 5)) {
// Kotlin 1.4 was deprecated when this process was introduced(jackson-module-kotlin 2.15).
throw IllegalStateException("jackson-module-kotlin requires Kotlin 1.5 or higher.")
throw JsonMappingException(
null,
"KotlinModule requires Kotlin version >= 1.5 - Found ${KotlinVersion.CURRENT}"
)
}
}

Expand Down

0 comments on commit 2a09127

Please sign in to comment.