From bacd8be4fced78a0a95fc167ddd37e83268066b1 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Mon, 19 Sep 2016 07:09:04 +0200 Subject: [PATCH] DATAREST-897 - Switched to use approximated Map in NestedEntitySerializer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now use CollectionFactory.createApproximateMap(…) to avoid picking up persistence technology specific Map implementations that might cause issues (e.g. requiring a Session in the case of Hibernate). Related tickets: DATAREST-864. --- .../data/rest/webmvc/json/PersistentEntityJackson2Module.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java index 5d37fd9f8..917a2d5a3 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java @@ -356,7 +356,7 @@ public class PersistentEntityJackson2Module extends SimpleModule { } else if (value instanceof Map) { Map source = (Map) value; - Map resources = CollectionFactory.createMap(value.getClass(), source.size()); + Map resources = CollectionFactory.createApproximateMap(value.getClass(), source.size()); for (Entry entry : source.entrySet()) { resources.put(entry.getKey(), toResource(entry.getValue()));