slachiewicz opened a new pull request, #424:
URL: https://github.com/apache/maven-shared-utils/pull/424

   `PropertyUtils.loadProperties(InputStream)` and 
`loadOptionalProperties(InputStream)` close the stream the caller handed them, 
via a try-with-resources that re-binds the parameter. A method that did not 
open a stream should not close it -- the caller may still need it, and closing 
it is invisible from the signature.
   
   Fixes [#274](https://github.com/apache/maven-shared-utils/issues/274).
   
   The commit is [Elliotte Rusty Harold](https://github.com/elharo)'s, 
cherry-picked from the `fix/propertyutils-stream-close` branch he pushed here 
on 2026-07-01 and never opened as a PR. Authorship is preserved. The only thing 
added on top is `spotless:apply` output, since that branch predates a 
formatting change on `master`. Opening it because the fix is finished and 3.5.0 
is close; happy to hand it back if he would rather carry it himself.
   
   Note for reviewers: this is a behaviour change. Callers that relied on the 
accidental close now have to close their own stream. That is the point of the 
issue, but it is worth a moment's thought before merging.
   
   Verified: `mvn -B verify` on JDK 17 -> Tests run: 789, Failures: 0, Errors: 
0. Spotless clean.
   
   *This change was created with AI assistance.*
   


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