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: The `connection.getInputStream()` should be used in a 
try-with-resources.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to