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

   Backport of 0437c087 and 16bbda7e (master) to maven-resolver-1.9.x.
   
   `parseLiteral(String)` left its `BufferedReader` open if `parse()` threw, 
since the `close()` call after it was skipped on the exception path. 
`parseMultiResource(String)` never closed its reader at all, not even on the 
success path. `parse(URL)` already closed it in a `finally` block but can be 
simplified the same way.
   
   Wraps all three in try-with-resources, matching master's fix. No behavior 
change on the success path; the existing 14 tests in 
`DependencyGraphParserTest` still pass, `checkstyle:check` and `spotless:check` 
are green.
   
   - [x] I hereby declare this contribution to be licensed under the Apache 
License Version 2.0, January 2004
   - [x] I hereby declare that I have filed an Apache Individual Contributor 
License Agreement.


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