diff --git a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java index b38725ecee..68d1e94109 100644 --- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java +++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java @@ -370,7 +370,6 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH } @Override - @Deprecated public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { ctx.deregister(promise); } diff --git a/transport/src/main/java/io/netty/channel/Channel.java b/transport/src/main/java/io/netty/channel/Channel.java index ad4af39626..d3d2c48674 100644 --- a/transport/src/main/java/io/netty/channel/Channel.java +++ b/transport/src/main/java/io/netty/channel/Channel.java @@ -292,7 +292,6 @@ public interface Channel extends AttributeMap, Comparable { * {@link Channel}. * */ - @Deprecated ChannelFuture deregister(); /** @@ -380,7 +379,6 @@ public interface Channel extends AttributeMap, Comparable { * method called of the next {@link ChannelOutboundHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ - @Deprecated ChannelFuture deregister(ChannelPromise promise); /** @@ -502,7 +500,6 @@ public interface Channel extends AttributeMap, Comparable { * Deregister the {@link Channel} of the {@link ChannelPromise} from {@link EventLoop} and notify the * {@link ChannelPromise} once the operation was complete. */ - @Deprecated void deregister(ChannelPromise promise); /** diff --git a/transport/src/main/java/io/netty/channel/ChannelHandler.java b/transport/src/main/java/io/netty/channel/ChannelHandler.java index acad785d73..47df8418db 100644 --- a/transport/src/main/java/io/netty/channel/ChannelHandler.java +++ b/transport/src/main/java/io/netty/channel/ChannelHandler.java @@ -192,12 +192,7 @@ public interface ChannelHandler { /** * Gets called if a {@link Throwable} was thrown. - * - * @deprecated Will be removed in the future and only {@link ChannelInboundHandler} will receive - * exceptionCaught events. For {@link ChannelOutboundHandler} the {@link ChannelPromise} - * must be failed. */ - @Deprecated void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception; /** diff --git a/transport/src/main/java/io/netty/channel/ChannelHandlerAdapter.java b/transport/src/main/java/io/netty/channel/ChannelHandlerAdapter.java index 3cb1cc29f5..1f9496562e 100644 --- a/transport/src/main/java/io/netty/channel/ChannelHandlerAdapter.java +++ b/transport/src/main/java/io/netty/channel/ChannelHandlerAdapter.java @@ -81,10 +81,8 @@ public abstract class ChannelHandlerAdapter implements ChannelHandler { * * Sub-classes may override this method to change behavior. */ - @Deprecated @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) - throws Exception { + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { ctx.fireExceptionCaught(cause); } } diff --git a/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java b/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java index c45c60fc1e..adb4fd4bab 100644 --- a/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java +++ b/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java @@ -174,7 +174,6 @@ public interface ChannelHandlerContext extends AttributeMap { * called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ - @Deprecated ChannelHandlerContext fireChannelUnregistered(); /** @@ -308,7 +307,6 @@ public interface ChannelHandlerContext extends AttributeMap { * {@link Channel}. * */ - @Deprecated ChannelFuture deregister(); /** @@ -396,7 +394,6 @@ public interface ChannelHandlerContext extends AttributeMap { * method called of the next {@link ChannelOutboundHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ - @Deprecated ChannelFuture deregister(ChannelPromise promise); /** diff --git a/transport/src/main/java/io/netty/channel/ChannelHandlerInvokerUtil.java b/transport/src/main/java/io/netty/channel/ChannelHandlerInvokerUtil.java index 0a0fd1001f..29db91a950 100644 --- a/transport/src/main/java/io/netty/channel/ChannelHandlerInvokerUtil.java +++ b/transport/src/main/java/io/netty/channel/ChannelHandlerInvokerUtil.java @@ -35,7 +35,6 @@ public final class ChannelHandlerInvokerUtil { } } - @SuppressWarnings("deprecation") public static void invokeChannelUnregisteredNow(ChannelHandlerContext ctx) { try { ((ChannelInboundHandler) ctx.handler()).channelUnregistered(ctx); @@ -60,7 +59,6 @@ public final class ChannelHandlerInvokerUtil { } } - @SuppressWarnings("deprecation") public static void invokeExceptionCaughtNow(final ChannelHandlerContext ctx, final Throwable cause) { try { ctx.handler().exceptionCaught(ctx, cause); @@ -138,7 +136,6 @@ public final class ChannelHandlerInvokerUtil { } } - @SuppressWarnings("deprecation") public static void invokeDeregisterNow(final ChannelHandlerContext ctx, final ChannelPromise promise) { try { ((ChannelOutboundHandler) ctx.handler()).deregister(ctx, promise); diff --git a/transport/src/main/java/io/netty/channel/ChannelInboundHandler.java b/transport/src/main/java/io/netty/channel/ChannelInboundHandler.java index dc5a428b98..56693593f5 100644 --- a/transport/src/main/java/io/netty/channel/ChannelInboundHandler.java +++ b/transport/src/main/java/io/netty/channel/ChannelInboundHandler.java @@ -28,10 +28,7 @@ public interface ChannelInboundHandler extends ChannelHandler { /** * The {@link Channel} of the {@link ChannelHandlerContext} was unregistered from its {@link EventLoop} - * - * @deprecated use {@link #channelInactive(ChannelHandlerContext)} */ - @Deprecated void channelUnregistered(ChannelHandlerContext ctx) throws Exception; /** diff --git a/transport/src/main/java/io/netty/channel/ChannelOutboundHandler.java b/transport/src/main/java/io/netty/channel/ChannelOutboundHandler.java index 0795198195..92a3943ad0 100644 --- a/transport/src/main/java/io/netty/channel/ChannelOutboundHandler.java +++ b/transport/src/main/java/io/netty/channel/ChannelOutboundHandler.java @@ -69,7 +69,6 @@ public interface ChannelOutboundHandler extends ChannelHandler { * @param promise the {@link ChannelPromise} to notify once the operation completes * @throws Exception thrown if an error accour */ - @Deprecated void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception; /** diff --git a/transport/src/main/java/io/netty/channel/ChannelPipeline.java b/transport/src/main/java/io/netty/channel/ChannelPipeline.java index 2353350620..0cb99989d0 100644 --- a/transport/src/main/java/io/netty/channel/ChannelPipeline.java +++ b/transport/src/main/java/io/netty/channel/ChannelPipeline.java @@ -693,7 +693,6 @@ public interface ChannelPipeline extends Iterable> * called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ - @Deprecated ChannelPipeline fireChannelUnregistered(); /** @@ -827,7 +826,6 @@ public interface ChannelPipeline extends Iterable> * {@link Channel}. * */ - @Deprecated ChannelFuture deregister(); /** @@ -915,7 +913,6 @@ public interface ChannelPipeline extends Iterable> * method called of the next {@link ChannelOutboundHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ - @Deprecated ChannelFuture deregister(ChannelPromise promise); /** diff --git a/transport/src/main/java/io/netty/channel/group/ChannelGroup.java b/transport/src/main/java/io/netty/channel/group/ChannelGroup.java index 7dbafa7377..2faa467aa9 100644 --- a/transport/src/main/java/io/netty/channel/group/ChannelGroup.java +++ b/transport/src/main/java/io/netty/channel/group/ChannelGroup.java @@ -228,7 +228,6 @@ public interface ChannelGroup extends Set, Comparable { * @return the {@link ChannelGroupFuture} instance that notifies when * the operation is done for all channels */ - @Deprecated ChannelGroupFuture deregister(); /** @@ -240,6 +239,5 @@ public interface ChannelGroup extends Set, Comparable { * @return the {@link ChannelGroupFuture} instance that notifies when * the operation is done for all channels */ - @Deprecated ChannelGroupFuture deregister(ChannelMatcher matcher); } diff --git a/transport/src/main/java/io/netty/channel/group/DefaultChannelGroup.java b/transport/src/main/java/io/netty/channel/group/DefaultChannelGroup.java index 157929f6bb..90b04b1f0d 100644 --- a/transport/src/main/java/io/netty/channel/group/DefaultChannelGroup.java +++ b/transport/src/main/java/io/netty/channel/group/DefaultChannelGroup.java @@ -190,7 +190,6 @@ public class DefaultChannelGroup extends AbstractSet implements Channel } @Override - @Deprecated public ChannelGroupFuture deregister() { return deregister(ChannelMatchers.all()); } @@ -294,7 +293,6 @@ public class DefaultChannelGroup extends AbstractSet implements Channel } @Override - @Deprecated public ChannelGroupFuture deregister(ChannelMatcher matcher) { if (matcher == null) { throw new NullPointerException("matcher"); diff --git a/transport/src/test/java/io/netty/channel/ReentrantChannelTest.java b/transport/src/test/java/io/netty/channel/ReentrantChannelTest.java index ea2fcd949d..b6fc1e6541 100644 --- a/transport/src/test/java/io/netty/channel/ReentrantChannelTest.java +++ b/transport/src/test/java/io/netty/channel/ReentrantChannelTest.java @@ -214,7 +214,6 @@ public class ReentrantChannelTest extends BaseChannelTest { } @Override - @SuppressWarnings("deprecation") public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { ctx.close(); }