Add @SupressWarnings("deprecation") to ChannelInboundHandlerAdapter and clarify deprecation in ChannelHandler (#9001)
Motivation: https://github.com/netty/netty/pull/8826 added @Deprecated to the exceptionCaught(...) method but we missed to add @SupressWarnings(...) to it's sub-types. Beside this we can make the deprecated docs a bit more clear. Modifications: - Add @SupressWarnings("deprecated") - Clarify docs. Result: Less warnings and more clear deprecated docs.
This commit is contained in:
parent
f8c89e2e05
commit
20042b6522
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user