Skip to content

Commit 781d6f0

Browse files
committed
Update release notes wrt #1129, add null check to help troubleshoot callback
1 parent 29bfc3b commit 781d6f0

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

release-notes/VERSION

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Project: jackson-databind
44
=== Releases ===
55
------------------------------------------------------------------------
66

7+
2.7.2 (not released yet)
8+
9+
#1129: When applying type modifiers, don't ignore container types.
10+
711
2.7.1-1 (03-Feb-2016)
812

913
Special one-off "micro patch" for:

src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,14 +1112,22 @@ else if (type instanceof WildcardType) {
11121112
// sanity check
11131113
throw new IllegalArgumentException("Unrecognized Type: "+((type == null) ? "[null]" : type.toString()));
11141114
}
1115-
/* Need to allow TypeModifiers to alter actual type. */
1115+
/* 21-Feb-2016, nateB/tatu: as per [databind#1129] (applied for 2.7.2),
1116+
* we do need to let all kinds of types to be refined, esp. for Scala module.
1117+
*/
11161118
if (_modifiers != null) {
11171119
TypeBindings b = resultType.getBindings();
11181120
if (b == null) {
11191121
b = EMPTY_BINDINGS;
11201122
}
11211123
for (TypeModifier mod : _modifiers) {
1122-
resultType = mod.modifyType(resultType, type, b, this);
1124+
JavaType t = mod.modifyType(resultType, type, b, this);
1125+
if (t == null) {
1126+
throw new IllegalStateException(String.format(
1127+
"TypeModifier %s (of type %s) return null for type %s",
1128+
mod, mod.getClass().getName(), resultType));
1129+
}
1130+
resultType = t;
11231131
}
11241132
}
11251133
return resultType;

0 commit comments

Comments
 (0)