Skip to content

Commit 3641432

Browse files
committed
Fixed #220
1 parent dc3ade0 commit 3641432

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

release-notes/VERSION

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Project: jackson-dataformat-xml
66

77
2.9.0 (not yet released)
88

9+
2.8.7 (not yet released)
10+
11+
#220: Avoid root-level wrapping for Map-like types, not just Maps
12+
913
2.8.6 (12-Jan-2017)
1014
2.8.5 (14-Nov-2016)
1115

src/main/java/com/fasterxml/jackson/dataformat/xml/util/TypeUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.fasterxml.jackson.dataformat.xml.util;
22

33
import java.util.Collection;
4-
import java.util.Map;
54

65
import com.fasterxml.jackson.databind.JavaType;
76

@@ -20,8 +19,9 @@ public static boolean isIndexedType(JavaType type)
2019
if (cls == byte[].class || cls == char[].class) {
2120
return false;
2221
}
23-
// issue#5: also, should not add wrapping for Maps
24-
if (Map.class.isAssignableFrom(cls)) {
22+
// Also, should not add wrapping for Maps
23+
// [dataformat-xml#220]: nor map-like (Scala Map) types
24+
if (type.isMapLikeType()) {
2525
return false;
2626
}
2727
return true;

0 commit comments

Comments
 (0)