Skip to content

Commit

Permalink
fix one of the tests broken by recent changes in jackson-databind v3
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Jun 15, 2024
1 parent f0e64b3 commit 0003d60
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tools.jackson.module.scala.deser

import tools.jackson.core.`type`.TypeReference
import tools.jackson.databind.DatabindException
import tools.jackson.core.exc.InputCoercionException
import tools.jackson.databind.annotation.JsonDeserialize
import tools.jackson.module.scala.deser.OptionWithNumberDeserializerTest.{OptionLong, OptionLongWithDefault}

Expand Down Expand Up @@ -57,7 +57,8 @@ class PrimitiveContainerTest extends DeserializationFixture
}

it should "enforce type constraints" in { f =>
val thrown = intercept[DatabindException] {
// InputCoercionException in Jackson 3 - was DatabindException in Jackson 2
val thrown = intercept[InputCoercionException] {
f.readValue("""{"value":9223372036854775807}""", new TypeReference[AnnotatedOptionInt] {}).value.get
}
thrown.getMessage should startWith ("Numeric value (9223372036854775807) out of range")
Expand Down

0 comments on commit 0003d60

Please sign in to comment.