You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ivakegg (via GitHub)" <gi...@apache.org> on 2023/03/24 14:24:45 UTC

[GitHub] [commons-vfs] ivakegg commented on a diff in pull request #383: fixes #VFS-834: Updated to avoid prematurely closing file objects.

ivakegg commented on code in PR #383:
URL: https://github.com/apache/commons-vfs/pull/383#discussion_r1147651610


##########
commons-vfs2/src/test/java/org/apache/commons/vfs2/AbstractProviderTestCase.java:
##########
@@ -114,14 +114,22 @@ 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);

Review Comment:
   This is what the previous method essentially did.  The inner assertSameURLContent closes it within a try-catch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org