Skip to content

Commit b63ef44

Browse files
nboseckerpivovarit
authored andcommitted
removed explicit types from map instantiation (eugenp#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
1 parent 6f75ad8 commit b63ef44

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎jackson/src/test/java/com/baeldung/jackson/serialization/JacksonMapSerializeTest.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class JacksonMapSerializeTest {
3030
public void whenSimpleMapSerialize_thenCorrect()
3131
throws JsonProcessingException {
3232

33-
Map<String, String> map = new HashMap<String, String>();
33+
Map<String, String> map = new HashMap<>();
3434
map.put("key", "value");
3535

3636
final ObjectMapper mapper = new ObjectMapper();
@@ -43,7 +43,7 @@ public void whenSimpleMapSerialize_thenCorrect()
4343
public void whenCustomObjectStringMapSerialize_thenCorrect()
4444
throws JsonProcessingException {
4545

46-
map = new HashMap<MyPair, String>();
46+
map = new HashMap<>();
4747
MyPair key = new MyPair("Abbott", "Costello");
4848
map.put(key, "Comedy");
4949

@@ -57,7 +57,7 @@ public void whenCustomObjectStringMapSerialize_thenCorrect()
5757
public void whenCustomObjectObjectMapSerialize_thenCorrect()
5858
throws JsonProcessingException {
5959

60-
cmap = new HashMap<MyPair, MyPair>();
60+
cmap = new HashMap<>();
6161
mapKey = new MyPair("Abbott", "Costello");
6262
mapValue = new MyPair("Comedy", "1940's");
6363
cmap.put(mapKey, mapValue);

0 commit comments

Comments
 (0)