Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.15.4</version>
<version>2.20.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.15.4</version>
<version>2.20.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.15.4</version>
<version>2.20</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/fusionauth/jwt/json/Mapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down