Skip to content

Commit

Permalink
re #VFS-834: ensure resource cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
ivakegg committed Apr 30, 2023
1 parent e0fc2f2 commit 5daf68f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ protected void assertSameContent(final String expected, final FileObject file) t
* are encoded using UTF-8.
*/
protected void assertSameURLContent(final String expected, final URLConnection connection) throws Exception {
assertSameURLContent(expected, connection.getInputStream(), connection);
try (InputStream in = connection.getInputStream()) {
assertSameURLContent(expected, in, connection);
}
}

/**
Expand Down

0 comments on commit 5daf68f

Please sign in to comment.