{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1173","repository_url":"https://api.github.com/repos/FasterXML/jackson-databind","labels_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1173/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1173/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1173/events","html_url":"https://github.com/FasterXML/jackson-databind/issues/1173","id":144362639,"number":1173,"title":"Deserialization of generics is broken on 2.7.3 if custom abstract type resolver is set","user":{"login":"j-j-marvin","id":18150576,"avatar_url":"https://avatars.githubusercontent.com/u/18150576?v=3","gravatar_id":"","url":"https://api.github.com/users/j-j-marvin","html_url":"https://github.com/j-j-marvin","followers_url":"https://api.github.com/users/j-j-marvin/followers","following_url":"https://api.github.com/users/j-j-marvin/following{/other_user}","gists_url":"https://api.github.com/users/j-j-marvin/gists{/gist_id}","starred_url":"https://api.github.com/users/j-j-marvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-j-marvin/subscriptions","organizations_url":"https://api.github.com/users/j-j-marvin/orgs","repos_url":"https://api.github.com/users/j-j-marvin/repos","events_url":"https://api.github.com/users/j-j-marvin/events{/privacy}","received_events_url":"https://api.github.com/users/j-j-marvin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-29T19:24:49Z","updated_at":"2016-03-30T09:32:48Z","closed_at":null,"body":"Hi there,\r\n\r\nAfter migration from 2.6.1 to 2.7.3 I've found that all deserialization of generic types are broken in cases when custom type resolver is specified. I've created a sample to reproduce the issue.\r\n\r\nOn 2.6.1 the output is:\r\n`class com.dummy.test.DeserializationTest$B`\r\n\r\nWhere as on 2.7.3 it has changed to:\r\n`class com.dummy.test.DeserializationTest$MyMap`\r\n\r\nIf I comment `mapper.registerModule(basicModule);` on 2.7.3 then deserialization also works as expected (the same way as on 2.6.1).\r\n\r\n```java\r\npackage com.dummy.test;\r\n\r\nimport com.fasterxml.jackson.annotation.JsonCreator;\r\nimport com.fasterxml.jackson.annotation.JsonProperty;\r\nimport com.fasterxml.jackson.databind.ObjectMapper;\r\nimport com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver;\r\nimport com.fasterxml.jackson.databind.module.SimpleModule;\r\n\r\nimport java.io.IOException;\r\nimport java.util.HashMap;\r\nimport java.util.Map;\r\n\r\n\r\npublic class DeserializationTest {\r\n\r\n    public static void main(String[] args) throws IOException {\r\n        ObjectMapper mapper = new ObjectMapper();\r\n        SimpleAbstractTypeResolver resolver = new SimpleAbstractTypeResolver();\r\n        resolver.addMapping(Map.class, MyMap.class);\r\n\r\n        SimpleModule basicModule = new SimpleModule();\r\n        basicModule.setAbstractTypes(resolver);\r\n        mapper.registerModule(basicModule);\r\n        String value = \"{\\\"z\\\": {\\\"zz\\\": {\\\"a\\\": 42}}}\";\r\n        A a = mapper.readValue(value, A.class);\r\n\r\n        Class deserializedClass = a.getMap().get(\"zz\").getClass();\r\n        System.out.println(deserializedClass);\r\n    }\r\n\r\n    public static class A {\r\n        private Map map;\r\n\r\n        @JsonCreator\r\n        public A(@JsonProperty(\"z\") Map<String, B> map) {\r\n            this.map = map;\r\n        }\r\n\r\n        public Map getMap() {\r\n            return map;\r\n        }\r\n    }\r\n\r\n    public static class B {\r\n        private int a;\r\n\r\n        public B(@JsonProperty(\"a\") int a) {\r\n            this.a = a;\r\n        }\r\n    }\r\n\r\n    public static class MyMap extends HashMap {\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/comments/203345413","html_url":"https://github.com/FasterXML/jackson-databind/issues/1173#issuecomment-203345413","issue_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1173","id":203345413,"user":{"login":"j-j-marvin","id":18150576,"avatar_url":"https://avatars.githubusercontent.com/u/18150576?v=3","gravatar_id":"","url":"https://api.github.com/users/j-j-marvin","html_url":"https://github.com/j-j-marvin","followers_url":"https://api.github.com/users/j-j-marvin/followers","following_url":"https://api.github.com/users/j-j-marvin/following{/other_user}","gists_url":"https://api.github.com/users/j-j-marvin/gists{/gist_id}","starred_url":"https://api.github.com/users/j-j-marvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-j-marvin/subscriptions","organizations_url":"https://api.github.com/users/j-j-marvin/orgs","repos_url":"https://api.github.com/users/j-j-marvin/repos","events_url":"https://api.github.com/users/j-j-marvin/events{/privacy}","received_events_url":"https://api.github.com/users/j-j-marvin/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T09:32:48Z","updated_at":"2016-03-30T09:32:48Z","body":"> As such, it must resolve to `MyMap extends HashMap<Object,Object> { }`, and parameterization can not be promoted from base type, despite there being `Map<String,B>`.\r\nYep, I see, however, types are available from target constructor (and I assume in 2.6.* taken from there). Also I don't see any contradiction in such assignment, nevertheless I understand that without  full codebase this sample looks a little bit strange.\r\nOne more thing to be more precise, in our case `MyMap extends HashMap<String, Object>` and cannot be converted to `MyMap<V> extends HashMap<String, V>`, since it is ok in some places to have values of different type in such map.\r\nSo the only way I see on 2.7.3 is to use different Mapper setup when extracting hierarchy of MyMap and normal classes, which is generally fine. However, still not clear why type cannot be extracted from target argument and looks like loosing a feature."}}