Skip to content

Commit e0e2de6

Browse files
committed
Revert #1277; unfortunately seems to leak misconfigured types, causing hard to debug (spooky action in distance) fails -- will redo for 2.8
1 parent 75a0953 commit e0e2de6

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

release-notes/VERSION

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Project: jackson-databind
88

99
#1215: Problem with type specialization for Maps with `@JsonDeserialize(as=subtype)`
1010
(reported by brentryan@github)
11-
#1277: Inefficient resolution of parametrized types
12-
(reported by Andriy P, plokhotnyuk@github)
1311
#1279: Ensure DOM parsing defaults to not expanding external entities
1412

1513
2.7.5 (11-Jun-2016)

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,12 +1171,11 @@ protected JavaType _fromClass(ClassStack context, Class<?> rawType, TypeBindings
11711171
if ((bindings == null) || bindings.isEmpty()) {
11721172
key = rawType;
11731173
result = _typeCache.get(key); // ok, cache object is synced
1174+
if (result != null) {
1175+
return result;
1176+
}
11741177
} else {
1175-
key = bindings.asKey(rawType);
1176-
}
1177-
result = _typeCache.get(key); // ok, cache object is synced
1178-
if (result != null) {
1179-
return result;
1178+
key = null;
11801179
}
11811180

11821181
// 15-Oct-2015, tatu: recursive reference?
@@ -1236,7 +1235,9 @@ else if (superClass != null) {
12361235
}
12371236
}
12381237
context.resolveSelfReferences(result);
1239-
_typeCache.putIfAbsent(key, result); // cache object syncs
1238+
if (key != null) {
1239+
_typeCache.putIfAbsent(key, result); // cache object syncs
1240+
}
12401241
return result;
12411242
}
12421243

0 commit comments

Comments
 (0)