Skip to content

Commit 76cbb67

Browse files
author
Tatu Saloranta
committed
Fix #71
1 parent 3e28293 commit 76cbb67

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/ValueIterator.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,14 @@ protected <R> R _throwNoSuchElement() {
406406
}
407407

408408
protected <R> R _handleMappingException(JSONObjectException e) {
409-
throw new UncheckedIOException(e.getMessage(), e);
409+
// Only with JDK8:
410+
// throw new UncheckedIOException(e.getMessage(), e);
411+
throw new RuntimeException(e.getMessage(), e);
410412
}
411413

412414
protected <R> R _handleIOException(IOException e) {
413-
throw new UncheckedIOException(e.getMessage(), e);
415+
// Only with JDK8:
416+
// throw new UncheckedIOException(e.getMessage(), e);
417+
throw new RuntimeException(e.getMessage(), e);
414418
}
415419
}

release-notes/VERSION-2.x

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Project: jackson-jr
44
=== Releases ===
55
------------------------------------------------------------------------
66

7+
2.10.2 (not yet released)
8+
9+
#71: Jackson-jr 2.10 accidentally uses `UncheckedIOException` only available on JDK 8
10+
711
2.10.1 (09-Nov-2019)
812

913
No changes since 2.10.0

0 commit comments

Comments
 (0)