Skip to content

Commit

Permalink
Fix #1711
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 26, 2017
1 parent 9c4a7e5 commit ce7d1c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 680 deletions.
4 changes: 3 additions & 1 deletion release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Project: jackson-databind
=== Releases ===
------------------------------------------------------------------------

2.8.9.1 (not yet released)
2.8.10 (not yet released)

#1657: `StdDateFormat` deserializes dates with no tz/offset as UTC instead of
configured timezone
Expand All @@ -12,6 +12,8 @@ Project: jackson-databind
with a recursive value type
(reported by Kevin G)
#1679: `StackOverflowError` in Dynamic `StdKeySerializer`
#1711: Delegating creator fails to work for binary data (`byte[]`) with
binary formats (CBOR, Smile)

2.8.9 (12-Jun-2017)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1266,9 +1266,8 @@ public Object deserializeFromString(JsonParser p, DeserializationContext ctxt) t
if (_objectIdReader != null) {
return deserializeFromObjectId(p, ctxt);
}
/* Bit complicated if we have delegating creator; may need to use it,
* or might not...
*/
// Bit complicated if we have delegating creator; may need to use it,
// or might not...
JsonDeserializer<Object> delegateDeser = _delegateDeserializer();
if (delegateDeser != null) {
if (!_valueInstantiator.canCreateFromString()) {
Expand Down Expand Up @@ -1379,6 +1378,18 @@ public Object deserializeFromEmbedded(JsonParser p, DeserializationContext ctxt)
if (_objectIdReader != null) {
return deserializeFromObjectId(p, ctxt);
}
// 26-Jul-2017, tatu: as per [databind#1711] need to support delegating case too
JsonDeserializer<Object> delegateDeser = _delegateDeserializer();
if (delegateDeser != null) {
if (!_valueInstantiator.canCreateFromString()) {
Object bean = _valueInstantiator.createUsingDelegate(ctxt,
delegateDeser.deserialize(p, ctxt));
if (_injectables != null) {
injectValues(ctxt, bean);
}
return bean;
}
}

// TODO: maybe add support for ValueInstantiator, embedded?

Expand Down
Loading

0 comments on commit ce7d1c9

Please sign in to comment.