Skip to content

Commit

Permalink
Follow-up fix wrt #4783: prevent too early fail on abstract Map types (
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder authored Nov 12, 2024
1 parent 5bdb34d commit a777bf3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -968,13 +968,9 @@ public JsonDeserializer<?> createMapDeserializer(DeserializationContext ctxt,
mapClass = type.getRawClass();
// But if so, also need to re-check creators...
beanDesc = config.introspectForCreation(type);
} else {
// [databind#292]: Actually, may be fine, but only if polymorphic deser enabled
if (type.getTypeHandler() == null) {
throw new IllegalArgumentException("Cannot find a deserializer for non-concrete Map type "+type);
}
deser = AbstractDeserializer.constructForNonPOJO(beanDesc);
}
// 11-Nov-2024, tatu: Related to [databind#4783] let's not fail on
// abstract Maps so they can work with merge (or factory methods)
} else {
// 10-Jan-2017, tatu: `java.util.Collections` types need help:
deser = JavaUtilCollectionsDeserializers.findForMap(ctxt, type);
Expand Down

0 comments on commit a777bf3

Please sign in to comment.