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

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

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


##########
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 does not look right, the method that allocates the resource should release it.



-- 
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