diff --git a/pom.xml b/pom.xml index aa50f8f8..d66a877f 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ com.fasterxml.jackson.core jackson-core - 2.15.4 + 2.20.1 jar compile false @@ -71,7 +71,7 @@ com.fasterxml.jackson.core jackson-databind - 2.15.4 + 2.20.1 jar compile false @@ -79,7 +79,7 @@ com.fasterxml.jackson.core jackson-annotations - 2.15.4 + 2.20 jar compile false diff --git a/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java b/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java index cc253b5c..98d9e768 100644 --- a/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java +++ b/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java @@ -51,10 +51,10 @@ public ZonedDateTime deserialize(JsonParser jp, DeserializationContext ctxt) thr try { value = Long.parseLong(str); } catch (NumberFormatException e) { - throw ctxt.mappingException(handledType()); + return (ZonedDateTime) ctxt.handleWeirdStringValue(handledType(), str, "not a valid Long value"); } } else { - throw ctxt.mappingException(handledType()); + return (ZonedDateTime) ctxt.handleUnexpectedToken(handledType(), jp); } return Instant.ofEpochSecond(value).atZone(ZoneOffset.UTC);