Repository navigation
Make RpcClient AutoCloseable and throw FlumeClientException from close() - #525
Merged
Merged
Conversation
…m `close()` Extending `Closeable` made `close()` throw the checked `IOException`, so callers had to handle a checked exception only for closing, while every other client method reports failures with the unchecked `FlumeClientException`. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
rgoers
approved these changes
Nov 8, 2026
ppkarwasz
added a commit
to apache/logging-flume-rpc
that referenced
this pull request
Nov 8, 2026
Since apache/logging-flume#525, `RpcClient` extends `AutoCloseable` and its `close()` throws the unchecked `FlumeClientException`, so the transport clients can no longer declare `IOException`. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #511,
RpcClientextendedCloseable, soclose()threw the checkedIOException. Callers had to handle a checked exception only for closing the client, while every other client method reports failures with the uncheckedFlumeClientException(#520).RpcClientnow extendsAutoCloseableandclose()throwsFlumeClientException, so clients still work with try-with-resources. The examples in the Developer Guide no longer needthrows IOException.The Avro and Thrift clients in apache/logging-flume-rpc override
close() throws IOExceptionand need a matching change once this is merged.🤖 Generated with Claude Code