Skip to content

Commit 62f869b

Browse files
authored
Streamline ThrowableDeserializer slightly to reduce call stack for deep nesting (#4345)
1 parent 0dc126e commit 62f869b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/std/ThrowableDeserializer.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,10 @@ public Object deserializeFromObject(JsonParser p, DeserializationContext ctxt) t
157157
if (p.hasToken(JsonToken.VALUE_NULL)) {
158158
suppressed = null;
159159
} else {
160-
// Resolve Throwable[] to JavaType pro-actively
161-
suppressed = ctxt.readValue(p,
160+
// Inlined `DeserializationContext.readValue()` to minimize call depth
161+
JsonDeserializer<Object> deser = ctxt.findRootValueDeserializer(
162162
ctxt.constructType(Throwable[].class));
163+
suppressed = (Throwable[]) deser.deserialize(p, ctxt);
163164
}
164165
continue;
165166
}

0 commit comments

Comments
 (0)