Skip to content

Commit

Permalink
finally + test (#1668)
Browse files Browse the repository at this point in the history
  • Loading branch information
potato-chef authored Nov 11, 2023
1 parent e81ca4a commit 78d0cd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ public void close() {
body.close();
} catch (IOException e){
throw new RuntimeException(e);
} finally {
delegate.close();
}
delegate.close();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ void close_throws() throws IOException {
doThrow(new IOException()).when(inputStream).close();

assertThrows(RuntimeException.class, () -> wrapper.close());
verify(delegate).close();
}

@Test
Expand Down

0 comments on commit 78d0cd2

Please sign in to comment.