File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
src/main/java/com/fasterxml/jackson/databind/type Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ Project: jackson-databind
4
4
=== Releases ===
5
5
------------------------------------------------------------------------
6
6
7
+ 2.7.2 (not released yet)
8
+
9
+ #1129: When applying type modifiers, don't ignore container types.
10
+
7
11
2.7.1-1 (03-Feb-2016)
8
12
9
13
Special one-off "micro patch" for:
Original file line number Diff line number Diff line change @@ -1112,14 +1112,22 @@ else if (type instanceof WildcardType) {
1112
1112
// sanity check
1113
1113
throw new IllegalArgumentException ("Unrecognized Type: " +((type == null ) ? "[null]" : type .toString ()));
1114
1114
}
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
+ */
1116
1118
if (_modifiers != null ) {
1117
1119
TypeBindings b = resultType .getBindings ();
1118
1120
if (b == null ) {
1119
1121
b = EMPTY_BINDINGS ;
1120
1122
}
1121
1123
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 ;
1123
1131
}
1124
1132
}
1125
1133
return resultType ;
You can’t perform that action at this time.
0 commit comments