From 8898162b16278313d00cd9b242beb4dce54abcd9 Mon Sep 17 00:00:00 2001 From: Jon Gentsch Date: Fri, 26 Dec 2025 10:25:18 -0500 Subject: [PATCH 1/2] Bumped fasterjackson from 2.15 to 2.20 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index aa50f8f..d66a877 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 From f3e1f1380799467598cf51b2c53f205a83b0fad4 Mon Sep 17 00:00:00 2001 From: CodeLogicAI Date: Fri, 26 Dec 2025 15:58:27 +0000 Subject: [PATCH 2/2] Fix Jackson 2.20 API compatibility issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated deprecated Jackson API usage to work with 2.20: - Replaced mappingException() calls with reportInputMismatch() and handleUnexpectedToken() - Updated setSerializationInclusion() to setDefaultPropertyInclusion() - Removed deprecated WRITE_NULL_MAP_VALUES configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/main/java/io/fusionauth/jwt/json/Mapper.java | 3 +-- .../io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/fusionauth/jwt/json/Mapper.java b/src/main/java/io/fusionauth/jwt/json/Mapper.java index 483966f..1b4ac6f 100644 --- a/src/main/java/io/fusionauth/jwt/json/Mapper.java +++ b/src/main/java/io/fusionauth/jwt/json/Mapper.java @@ -67,8 +67,7 @@ public static byte[] serialize(Object object) throws InvalidJWTException { } static { - OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL) - .configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false) + OBJECT_MAPPER.setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL) .configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true) .configure(DeserializationFeature.USE_BIG_INTEGER_FOR_INTS, true) .registerModule(new JacksonModule()); diff --git a/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java b/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java index cc253b5..eff89db 100644 --- a/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java +++ b/src/main/java/io/fusionauth/jwt/json/ZonedDateTimeDeserializer.java @@ -51,10 +51,12 @@ public ZonedDateTime deserialize(JsonParser jp, DeserializationContext ctxt) thr try { value = Long.parseLong(str); } catch (NumberFormatException e) { - throw ctxt.mappingException(handledType()); + ctxt.reportInputMismatch(handledType(), "Cannot parse string '%s' as a valid epoch timestamp", str); + return null; // This line should never be reached if reportInputMismatch throws internally } } else { - throw ctxt.mappingException(handledType()); + ctxt.handleUnexpectedToken(handledType(), jp); + return null; // This line should never be reached if handleUnexpectedToken throws internally } return Instant.ofEpochSecond(value).atZone(ZoneOffset.UTC);