PDGGK opened a new pull request, #39404: URL: https://github.com/apache/beam/pull/39404
Fixes #39403 `BrokerResponse` read the SEMP HTTP response body through a `BufferedReader` but never closed the underlying `InputStream`. Since `BrokerResponse.fromHttpResponse` is fed `HttpResponse#getContent()` and `SempBasicAuthClientExecutor` (`getQueueResponse` / `createQueueResponse` / `createSubscriptionResponse`) never disconnects the response or closes the stream elsewhere, every SEMP call leaked the HTTP response content stream. This wraps the reader in a try-with-resources so the stream is always closed once the body has been read. `Stream#lines()` already surfaces read errors as `UncheckedIOException`, so the constructor keeps the same unchecked failure contract; a close failure is wrapped the same way. Added `BrokerResponseTest` verifying that the content is still parsed correctly and that the input stream is closed after construction. -- 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]
