Skip to content

Commit

Permalink
Tentative fix for #2422 (to be verified)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 20, 2019
1 parent 9874b0e commit 5e4488a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Project: jackson-databind
to `handleUnknownVanilla()`
(proposed by Vladimir T, follow up to #822)
#2416: Optimize `ValueInstantiator` construction for default `Collection`, `Map` types
#2422: `scala.collection.immutable.ListMap` fails to serialize since 2.9.3
(reported by dejanlokar1@github)
#2425: Add global config override setting for `@JsonFormat.lenient()`

2.10.0.pr1 (19-Jul-2019)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,11 @@ private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType
// 19-Apr-2018, tatu: Hack for [databind#1964] -- allow type demotion
// for `java.util.Map` key type if (and only if) target type is
// `java.lang.Object`
// 19-Aug-2019, tatu: Further, allow for all Map-like types, with assumption
// first argument would be key; initially just because Scala Maps have
// some issues (see [databind#2422])
if (i == 0) {
if (sourceType.hasRawClass(Map.class)
if (sourceType.isMapLikeType()
&& act.hasRawClass(Object.class)) {
continue;
}
Expand Down

0 comments on commit 5e4488a

Please sign in to comment.