Skip to content

Commit 5e4488a

Browse files
committed
Tentative fix for #2422 (to be verified)
1 parent 9874b0e commit 5e4488a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

release-notes/VERSION-2.x

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Project: jackson-databind
1818
to `handleUnknownVanilla()`
1919
(proposed by Vladimir T, follow up to #822)
2020
#2416: Optimize `ValueInstantiator` construction for default `Collection`, `Map` types
21+
#2422: `scala.collection.immutable.ListMap` fails to serialize since 2.9.3
22+
(reported by dejanlokar1@github)
2123
#2425: Add global config override setting for `@JsonFormat.lenient()`
2224

2325
2.10.0.pr1 (19-Jul-2019)

src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,11 @@ private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType
487487
// 19-Apr-2018, tatu: Hack for [databind#1964] -- allow type demotion
488488
// for `java.util.Map` key type if (and only if) target type is
489489
// `java.lang.Object`
490+
// 19-Aug-2019, tatu: Further, allow for all Map-like types, with assumption
491+
// first argument would be key; initially just because Scala Maps have
492+
// some issues (see [databind#2422])
490493
if (i == 0) {
491-
if (sourceType.hasRawClass(Map.class)
494+
if (sourceType.isMapLikeType()
492495
&& act.hasRawClass(Object.class)) {
493496
continue;
494497
}

0 commit comments

Comments
 (0)