ppkarwasz commented on code in PR #799:
URL: https://github.com/apache/commons-io/pull/799#discussion_r2435103377
##########
src/main/java/org/apache/commons/io/channels/CloseShieldChannel.java:
##########
@@ -53,11 +57,10 @@ private static Set<Class<?>> collectChannelInterfaces(final
Class<?> type, final
* Wraps a channel to shield it from being closed.
*
* @param channel The underlying channel to shield, not {@code null}.
- * @param <T> Any Channel type (interface or class).
* @return A proxy that shields {@code close()} and enforces closed
semantics on other calls.
*/
@SuppressWarnings({ "unchecked", "resource" }) // caller closes
- public static <T extends Channel> T wrap(final T channel) {
+ public static Channel wrap(final Channel channel) {
Review Comment:
In
https://github.com/apache/commons-io/pull/799/commits/2fc87cc79ff17b9919f722735001d09b237f38ac
I:
- Restored the generic method.
- Documented the supported interfaces.
- All the listed interfaces either have an **explicit** unit test or do not
introduce any new methods (like `InterruptibleChannel`).
--
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]