slachiewicz opened a new pull request, #12846:
URL: https://github.com/apache/maven/pull/12846

   Make sure resources (`AuthenticationContext`, `InputStream`, `Reader`, 
`PrintWriter`) are properly closed even when exceptions are thrown by using 
try-with-resources.
   
   Rebase / adaptation of #669 for `maven-3.9.x`:
   - `LegacyRepositorySystem`: `AuthenticationContext` try-with-resources for 
`getAuthentication` and `getProxy`
   - `MavenRepositorySystem`: `AuthenticationContext` try-with-resources for 
`getAuthentication` and `getProxy`
   - `ProjectBuildingException`: `PrintWriter` try-with-resources in 
`createMessage`
   - `DefaultMavenPluginManager`: `InputStream` and `Reader` try-with-resources 
in `extractPluginDescriptor` and `parsePluginDescriptor`
   
   Related: #669, #12843, #12844, #12845
   
   - [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)


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