Skip to content

Commit e60e1cc

Browse files
committed
Start using UncheckedIOException as base for RuntimeJsonMappingException
1 parent 6b6a5ed commit e60e1cc

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/java/com/fasterxml/jackson/databind/MappingIterator.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.io.Closeable;
44
import java.io.IOException;
5+
import java.io.UncheckedIOException;
56
import java.util.*;
67

78
import com.fasterxml.jackson.core.*;
@@ -400,6 +401,6 @@ protected <R> R _handleMappingException(JsonMappingException e) {
400401
}
401402

402403
protected <R> R _handleIOException(IOException e) {
403-
throw new RuntimeException(e.getMessage(), e);
404+
throw new UncheckedIOException(e.getMessage(), e);
404405
}
405406
}

src/main/java/com/fasterxml/jackson/databind/exc/RuntimeJsonMappingException.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
package com.fasterxml.jackson.databind.exc;
22

3+
import java.io.UncheckedIOException;
4+
35
import com.fasterxml.jackson.databind.JsonMappingException;
46

57
/**
68
* Wrapper used when interface does not allow throwing a checked
79
* {@link JsonMappingException}
810
*/
911
@SuppressWarnings("serial")
10-
public class RuntimeJsonMappingException extends RuntimeException
12+
public class RuntimeJsonMappingException extends UncheckedIOException
1113
{
1214
public RuntimeJsonMappingException(JsonMappingException cause) {
1315
super(cause);
1416
}
1517

16-
public RuntimeJsonMappingException(String message) {
17-
super(message);
18-
}
19-
2018
public RuntimeJsonMappingException(String message, JsonMappingException cause) {
2119
super(message, cause);
2220
}

0 commit comments

Comments
 (0)