ppkarwasz opened a new pull request, #786: URL: https://github.com/apache/commons-io/pull/786
Adds `Channels.closeShield(Channel)` to return a JDK proxy that preserves the delegate’s `Channel` sub-interfaces and shields the underlying channel from `close()`. **Behavior** * `close()` flips shield state; delegate is not closed. * `isOpen()` reflects shield state and delegates if shield is not closed. * After shield-close, I/O/mutating methods throw `ClosedChannelException`; safe queries (e.g., `NetworkChannel.supportedOptions()`) still work. * Fluent methods that return `this` (e.g., `SeekableByteChannel.position/truncate`, `NetworkChannel.bind/setOption`) return the **proxy**. * Stable `equals`/`hashCode`/`toString` * The method is idempotent (no double-wrapping). **Tests** * All methods of `SeekableByteChannel` / `NetworkChannel` and super-interfaces are tested. -- 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]
