Skip to content

Commit

Permalink
JsonRpcClientJavaNet: MappingFunction.apply declare CompletionException
Browse files Browse the repository at this point in the history
which will be contain a wrapped JsonProcessingException if one is thrown
by applyThrows.
  • Loading branch information
msgilligan committed Sep 22, 2023
1 parent 84078d1 commit 88c46cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ protected interface MappingFunction<R> extends Function<String, R> {
* Gets a result. Wraps checked {@link JsonProcessingException} in {@link CompletionException}
* @param s input
* @return a result
* @throws CompletionException (unchecked) if a JsonProcessingException exception occurs
*/
@Override
default R apply(String s) {
default R apply(String s) throws CompletionException {
try {
return applyThrows(s);
} catch (JsonProcessingException e) {
Expand Down

0 comments on commit 88c46cf

Please sign in to comment.