Skip to content

Commit

Permalink
Merge branch '2.11' into 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 6, 2020
2 parents ca3005a + 3e964e2 commit da390a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,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
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.fasterxml.jackson.failing;
package com.fasterxml.jackson.databind.deser.jdk;

import java.util.Map;

import com.fasterxml.jackson.core.type.TypeReference;

import com.fasterxml.jackson.databind.*;

public class GenericTypeDeserialization2846Test extends BaseMapTest
public class MapRawWithGeneric2846Test extends BaseMapTest
{
@SuppressWarnings("rawtypes")
static class GenericEntity<T> {
Expand Down

0 comments on commit da390a5

Please sign in to comment.