Skip to content

Commit

Permalink
Streamline ThrowableDeserializer slightly to reduce call stack for …
Browse files Browse the repository at this point in the history
…deep nesting (FasterXML#4345)
  • Loading branch information
cowtowncoder authored Jan 26, 2024
1 parent 0dc126e commit 62f869b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ public Object deserializeFromObject(JsonParser p, DeserializationContext ctxt) t
if (p.hasToken(JsonToken.VALUE_NULL)) {
suppressed = null;
} else {
// Resolve Throwable[] to JavaType pro-actively
suppressed = ctxt.readValue(p,
// Inlined `DeserializationContext.readValue()` to minimize call depth
JsonDeserializer<Object> deser = ctxt.findRootValueDeserializer(
ctxt.constructType(Throwable[].class));
suppressed = (Throwable[]) deser.deserialize(p, ctxt);
}
continue;
}
Expand Down

0 comments on commit 62f869b

Please sign in to comment.