Skip to content

Commit

Permalink
Backport #1288 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 12, 2016
1 parent 261ea42 commit f6fbed5
Show file tree
Hide file tree
Showing 3 changed files with 529 additions and 2 deletions.
1 change: 1 addition & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Project: jackson-databind
#1215: Problem with type specialization for Maps with `@JsonDeserialize(as=subtype)`
(reported by brentryan@github)
#1279: Ensure DOM parsing defaults to not expanding external entities
#1288: Type id not exposed for `JsonTypeInfo.As.EXTERNAL_PROPERTY` even when `visible` set to `true`

2.7.5 (11-Jun-2016)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,16 @@ protected Object deserializeWithExternalTypeId(JsonParser p,
{
final Class<?> activeView = _needViewProcesing ? ctxt.getActiveView() : null;
final ExternalTypeHandler ext = _externalTypeIdHandler.start();
for (; p.getCurrentToken() != JsonToken.END_OBJECT; p.nextToken()) {

for (JsonToken t = p.getCurrentToken(); t == JsonToken.FIELD_NAME; t = p.nextToken()) {
String propName = p.getCurrentName();
p.nextToken();
t = p.nextToken();
SettableBeanProperty prop = _beanProperties.find(propName);
if (prop != null) { // normal case
// [JACKSON-831]: may have property AND be used as external type id:
if (t.isScalarValue()) {
ext.handleTypePropertyValue(p, ctxt, propName, bean);
}
if (activeView != null && !prop.visibleInView(activeView)) {
p.skipChildren();
continue;
Expand Down
Loading

0 comments on commit f6fbed5

Please sign in to comment.