elharo opened a new pull request, #2056:
URL: https://github.com/apache/maven-resolver/pull/2056

   Fixes #1998
   
   Convert manual `try-catch-finally` stream handling to try-with-resources in 
the test utilities:
   
   - `TestFileUtils`: `copyFile`, `readBytes`, `writeBytes`, `readProps`, 
`writeProps`
   - `TestFileProcessor`: `write(File, String)`, `write(File, InputStream)`, 
`copy(File, File, ProgressListener)`
   
   Resources created inside each method are now closed reliably (with close 
exceptions properly suppressed), eliminating the leak when an explicit 
`close()` throws before the `finally` block. The caller-supplied `InputStream` 
in `TestFileProcessor.write/copy` remains intentionally unclosed, matching 
prior behavior.
   
   No new tests required.


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