Skip to content

Commit 0d2137f

Browse files
author
Grzegorz Piwowarek
committed
Remove unnecessary throws clauses
1 parent feb53db commit 0d2137f

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

jackson/src/test/java/org/baeldung/jackson/deserialization/JacksonDeserializeTest.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
package org.baeldung.jackson.deserialization;
22

3-
import java.io.IOException;
4-
import java.text.DateFormat;
5-
import java.text.SimpleDateFormat;
3+
import com.fasterxml.jackson.databind.ObjectMapper;
64
import org.baeldung.jackson.entities.Movie;
75
import org.junit.Assert;
86
import org.junit.Test;
97

10-
import com.fasterxml.jackson.core.JsonParseException;
11-
import com.fasterxml.jackson.databind.JsonMappingException;
12-
import com.fasterxml.jackson.databind.ObjectMapper;
8+
import java.io.IOException;
9+
import java.text.DateFormat;
10+
import java.text.SimpleDateFormat;
1311

1412
public class JacksonDeserializeTest {
1513

1614
@Test
17-
public void whenSimpleDeserialize_thenCorrect() throws JsonParseException, JsonMappingException, IOException {
15+
public void whenSimpleDeserialize_thenCorrect() throws IOException {
1816

1917
String jsonInput = "{\"imdbId\":\"tt0472043\",\"actors\":[{\"imdbId\":\"nm2199632\",\"dateOfBirth\":\"1982-09-21T12:00:00+01:00\",\"filmography\":[\"Apocalypto\",\"Beatdown\",\"Wind Walkers\"]}]}";
2018
ObjectMapper mapper = new ObjectMapper();
@@ -25,7 +23,7 @@ public void whenSimpleDeserialize_thenCorrect() throws JsonParseException, JsonM
2523
}
2624

2725
@Test
28-
public void whenCustomDeserialize_thenCorrect() throws JsonParseException, JsonMappingException, IOException {
26+
public void whenCustomDeserialize_thenCorrect() throws IOException {
2927

3028
String jsonInput = "{\"imdbId\":\"tt0472043\",\"director\":\"Mel Gibson\",\"actors\":[{\"imdbId\":\"nm2199632\",\"dateOfBirth\":\"1982-09-21T12:00:00+01:00\",\"filmography\":[\"Apocalypto\",\"Beatdown\",\"Wind Walkers\"]}]}";
3129

0 commit comments

Comments
 (0)