Skip to content

Commit

Permalink
Fix #2560
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Dec 6, 2019
1 parent f229cb0 commit a9017ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -1006,3 +1006,7 @@ Mark Schäfer (mark--@github)
Fabian Lange (CodingFabian@github)
* Reported #2556: Contention in `TypeNameIdResolver.idFromClass()`
(2.10.2)
Stefan Wendt (stewe@github)
* Reported #2560: Check `WRAP_EXCEPTIONS` in `CollectionDeserializer.handleNonArray()`
(2.10.2)
2 changes: 2 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Project: jackson-databind
(reported by cpopp@github)
#2556: Contention in `TypeNameIdResolver.idFromClass()`
(reported by Fabian L)
#2560: Check `WRAP_EXCEPTIONS` in `CollectionDeserializer.handleNonArray()`
(reported by Stefan W)

2.10.1 (09-Nov-2019)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ protected final Collection<Object> handleNonArray(JsonParser p, DeserializationC
value = valueDes.deserializeWithType(p, ctxt, typeDeser);
}
} catch (Exception e) {
boolean wrap = (ctxt == null) || ctxt.isEnabled(DeserializationFeature.WRAP_EXCEPTIONS);
if (!wrap) {
ClassUtil.throwIfRTE(e);
}
// note: pass Object.class, not Object[].class, as we need element type for error info
throw JsonMappingException.wrapWithPath(e, Object.class, result.size());
}
Expand Down

0 comments on commit a9017ec

Please sign in to comment.