Skip to content

Commit

Permalink
Fix #2846
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 6, 2020
1 parent 9a38c23 commit 1a59180
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Project: jackson-databind
#2840: `ObjectMapper.activateDefaultTypingAsProperty()` is not using
parameter `PolymorphicTypeValidator`
(reported by Daniel W)
#2846: Problem deserialization "raw generic" fields (like `Map`) in 2.11.2
- Fix issues with `MapLikeType.isTrueMapType()`,
`CollectionLikeType.isTrueCollectionType()`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ public static AnnotatedClass constructWithoutSuperTypes(Class<?> raw, MapperConf

@Override
public JavaType resolveType(Type type) {
// 05-Sep-2020, tatu: [databind#2846][databind#2821] avoid
// passing context in case of Raw class (generic type declared
// without type parametrers) as that can lead to mismatch
if (type instanceof Class<?>) {
return _typeFactory.constructType(type);
}
return _typeFactory.constructType(type, _bindings);
}

Expand Down

0 comments on commit 1a59180

Please sign in to comment.