diff --git a/transport/src/main/java/io/netty/channel/ChannelHandler.java b/transport/src/main/java/io/netty/channel/ChannelHandler.java index f9401080eb..3879056e43 100644 --- a/transport/src/main/java/io/netty/channel/ChannelHandler.java +++ b/transport/src/main/java/io/netty/channel/ChannelHandler.java @@ -191,7 +191,8 @@ public interface ChannelHandler { /** * Gets called if a {@link Throwable} was thrown. * - * @deprecated is part of {@link ChannelInboundHandler} + * @deprecated if you want to handle this event you should implement {@link ChannelInboundHandler} and + * implement the method there. */ @Deprecated void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception; diff --git a/transport/src/main/java/io/netty/channel/ChannelInboundHandlerAdapter.java b/transport/src/main/java/io/netty/channel/ChannelInboundHandlerAdapter.java index d0a1d2d766..c451329794 100644 --- a/transport/src/main/java/io/netty/channel/ChannelInboundHandlerAdapter.java +++ b/transport/src/main/java/io/netty/channel/ChannelInboundHandlerAdapter.java @@ -126,6 +126,7 @@ public class ChannelInboundHandlerAdapter extends ChannelHandlerAdapter implemen * Sub-classes may override this method to change behavior. */ @Override + @SuppressWarnings("deprecation") public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { ctx.fireExceptionCaught(cause);