Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Apr 8, 2017
2 parents 33c8e7d + 6b9782b commit 32001a6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 33 deletions.
30 changes: 8 additions & 22 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ Project: jackson-databind

#935: `@JsonProperty(access = Access.READ_ONLY)` - unexpected behaviour
#1317: '@JsonIgnore' annotation not working with creator properties, serialization
#1367: No Object Id found for an instance when using `@ConstructorProperties`
#1505: @JsonEnumDefaultValue should take precedence over FAIL_ON_NUMBERS_FOR_ENUMS
(suggested by Stephan S)
#1506: Missing `KeyDeserializer` for `CharSequence`
#1513: `MapSerializer._orderEntries()` throws NPE when operating on `ConcurrentHashMap`
(reported by Sovietaced@github)
- Simplified processing of class annotations (for `AnnotatedClass`) to try to
solve rare concurrency problems with "root name" annotations.

2.8.6 (12-Jan-2017)

Expand Down Expand Up @@ -168,23 +160,17 @@ Project: jackson-databind
#1277: Add caching of resolved generic types for `TypeFactory`
(requested by Andriy P)

2.7.9 (not released yet)

2.7.9 (04-Feb-2017)

#1367: No Object Id found for an instance when using `@ConstructorProperties`
(reported by kajo-bellabeat@github; fix by diegode@github)
#1432: Off by 1 bug in PropertyValueBuffer
(reported by Kevin D)
#1439: NPE when using with filter id, serializing `java.util.Map` types
#1451: Type parameter not passed by `ObjectWriter` if serializer pre-fetch disabled
(reported by Frédéric C)
#1456: `TypeFactory` type resolution broken in 2.7 for generic types
when using `constructType` with context
(reported by Dmitry S)
#1476: Wrong constructor picked up when deserializing object
(reported by laurentgo@github)
#1501: `ArrayIndexOutOfBoundsException` on non-static inner class constructor
(reported by Kevin H)
#1505: @JsonEnumDefaultValue should take precedence over FAIL_ON_NUMBERS_FOR_ENUMS
(suggested by Stephan S)
#1506: Missing `KeyDeserializer` for `CharSequence`
#1513: `MapSerializer._orderEntries()` throws NPE when operating on `ConcurrentHashMap`
(reported by Sovietaced@github)
- Simplified processing of class annotations (for `AnnotatedClass`) to try to
solve rare concurrency problems with "root name" annotations.

2.7.8 (26-Sep-2016)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public final class AnnotatedClass
* Member methods of interest; for now ones with 0 or 1 arguments
* (just optimization, since others won't be used now)
*/
protected AnnotatedMethodMap _memberMethods;
protected AnnotatedMethodMap _memberMethods;

/**
* Member fields of interest: ones that are either public,
Expand Down Expand Up @@ -538,23 +538,28 @@ private void resolveCreators()
*/
private void resolveMemberMethods()
{
_memberMethods = new AnnotatedMethodMap();
_memberMethods = _resolveMemberMethods();
}

private AnnotatedMethodMap _resolveMemberMethods()
{
AnnotatedMethodMap memberMethods = new AnnotatedMethodMap();
AnnotatedMethodMap mixins = new AnnotatedMethodMap();
// first: methods from the class itself
_addMemberMethods(_class, this, _memberMethods, _primaryMixIn, mixins);
_addMemberMethods(_class, this, memberMethods, _primaryMixIn, mixins);

// and then augment these with annotations from super-types:
for (JavaType type : _superTypes) {
Class<?> mixin = (_mixInResolver == null) ? null : _mixInResolver.findMixInClassFor(type.getRawClass());
_addMemberMethods(type.getRawClass(),
new TypeResolutionContext.Basic(_typeFactory, type.getBindings()),
_memberMethods, mixin, mixins);
memberMethods, mixin, mixins);
}
// Special case: mix-ins for Object.class? (to apply to ALL classes)
if (_mixInResolver != null) {
Class<?> mixin = _mixInResolver.findMixInClassFor(Object.class);
if (mixin != null) {
_addMethodMixIns(_class, _memberMethods, mixin, mixins);
_addMethodMixIns(_class, memberMethods, mixin, mixins);
}
}

Expand All @@ -575,14 +580,15 @@ private void resolveMemberMethods()
// Since it's from java.lang.Object, no generics, no need for real type context:
AnnotatedMethod am = _constructMethod(m, this);
_addMixOvers(mixIn.getAnnotated(), am, false);
_memberMethods.add(am);
memberMethods.add(am);
}
} catch (Exception e) { }
}
}
}
return memberMethods;
}

/**
* Method that will collect all member (non-static) fields
* that are either public, or have at least a single annotation
Expand All @@ -591,14 +597,16 @@ private void resolveMemberMethods()
private void resolveFields()
{
Map<String,AnnotatedField> foundFields = _findFields(_type, this, null);
List<AnnotatedField> f;
if (foundFields == null || foundFields.size() == 0) {
_fields = Collections.emptyList();
f = Collections.emptyList();
} else {
_fields = new ArrayList<AnnotatedField>(foundFields.size());
_fields.addAll(foundFields.values());
f = new ArrayList<AnnotatedField>(foundFields.size());
f.addAll(foundFields.values());
}
_fields = f;
}

/*
/**********************************************************
/* Helper methods for resolving class annotations
Expand Down

0 comments on commit 32001a6

Please sign in to comment.