Skip to content

Commit

Permalink
Fix #1843
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 28, 2017
1 parent 3a8737c commit 0ee3f5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Project: jackson-databind
(reported byb henryptung@github)
#1807: Jackson-databind caches plain map deserializer and use it even map has `@JsonDeserializer`
(reported by lexas2509@github)
#1843: Include name of unsettable property in exception from `SetterlessProperty.set()`
(suggested by andreh7@github)

2.9.2 (14-Oct-2017)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt,
} catch (UnresolvedForwardReference reference) {
boolean usingIdentityInfo = (_objectIdInfo != null) || (_valueDeserializer.getObjectIdReader() != null);
if (!usingIdentityInfo) {
throw JsonMappingException.from(p, "Unresolved forward reference but no identity info.", reference);
throw JsonMappingException.from(p, "Unresolved forward reference but no identity info", reference);
}
reference.getRoid().appendReferring(new PropertyReferring(this, reference, _type.getRawClass(), instance));
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public Object deserializeSetAndReturn(JsonParser p,
deserializeAndSet(p, ctxt, instance);
return instance;
}

@Override
public final void set(Object instance, Object value) throws IOException {
throw new UnsupportedOperationException("Should never call 'set' on setterless property");
throw new UnsupportedOperationException("Should never call `set()` on setterless property ('"+getName()+"')");
}

@Override
Expand Down

0 comments on commit 0ee3f5c

Please sign in to comment.