From b63ef448db503c66b11f99f65d6c6b9bc73a7454 Mon Sep 17 00:00:00 2001 From: Nancy Bosecker Date: Wed, 29 Mar 2017 08:42:38 -0700 Subject: [PATCH] removed explicit types from map instantiation (#1532) * Solr w Apache SolrJ * Solr w Apache SolrJ * updated test names and moved add to @before method * create apache-solrj module, moved code from spring-data-solr * More examples for indexing,delete,and query for solrj * More examples for indexing,delete,and query for solrj * Jackson Map Serialize/Deserialize * Jackson Map Serialize/Deserialize * Jackson version update * keydeserializer code added * keydeserializer code added * remove explicit types from map instantion --- .../jackson/serialization/JacksonMapSerializeTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jackson/src/test/java/com/baeldung/jackson/serialization/JacksonMapSerializeTest.java b/jackson/src/test/java/com/baeldung/jackson/serialization/JacksonMapSerializeTest.java index 71ba698e8e..841b12ca03 100644 --- a/jackson/src/test/java/com/baeldung/jackson/serialization/JacksonMapSerializeTest.java +++ b/jackson/src/test/java/com/baeldung/jackson/serialization/JacksonMapSerializeTest.java @@ -30,7 +30,7 @@ public class JacksonMapSerializeTest { public void whenSimpleMapSerialize_thenCorrect() throws JsonProcessingException { - Map map = new HashMap(); + Map map = new HashMap<>(); map.put("key", "value"); final ObjectMapper mapper = new ObjectMapper(); @@ -43,7 +43,7 @@ public class JacksonMapSerializeTest { public void whenCustomObjectStringMapSerialize_thenCorrect() throws JsonProcessingException { - map = new HashMap(); + map = new HashMap<>(); MyPair key = new MyPair("Abbott", "Costello"); map.put(key, "Comedy"); @@ -57,7 +57,7 @@ public class JacksonMapSerializeTest { public void whenCustomObjectObjectMapSerialize_thenCorrect() throws JsonProcessingException { - cmap = new HashMap(); + cmap = new HashMap<>(); mapKey = new MyPair("Abbott", "Costello"); mapValue = new MyPair("Comedy", "1940's"); cmap.put(mapKey, mapValue);