Skip to content

Commit a777bf3

Browse files
authored
Follow-up fix wrt #4783: prevent too early fail on abstract Map types (#4794)
1 parent 5bdb34d commit a777bf3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -968,13 +968,9 @@ public JsonDeserializer<?> createMapDeserializer(DeserializationContext ctxt,
968968
mapClass = type.getRawClass();
969969
// But if so, also need to re-check creators...
970970
beanDesc = config.introspectForCreation(type);
971-
} else {
972-
// [databind#292]: Actually, may be fine, but only if polymorphic deser enabled
973-
if (type.getTypeHandler() == null) {
974-
throw new IllegalArgumentException("Cannot find a deserializer for non-concrete Map type "+type);
975-
}
976-
deser = AbstractDeserializer.constructForNonPOJO(beanDesc);
977971
}
972+
// 11-Nov-2024, tatu: Related to [databind#4783] let's not fail on
973+
// abstract Maps so they can work with merge (or factory methods)
978974
} else {
979975
// 10-Jan-2017, tatu: `java.util.Collections` types need help:
980976
deser = JavaUtilCollectionsDeserializers.findForMap(ctxt, type);

0 commit comments

Comments
 (0)