Skip to content

Commit ac34240

Browse files
authored
Added "@OverRide" to the methods initChannel() (#13490)
Motivation: Overridden methods are not annotated with "@ Override". Modification: Added "@ Override" to the methods initChannel(): - io.netty.handler.codec.http2.Http2MultiplexTransportTest#asyncSettingsAck0 - io.netty.example.mqtt.heartBeat.MqttHeartBeatBroker#main - io.netty.example.mqtt.heartBeat.MqttHeartBeatClient#main Result: The code looks more intuitive. Co-authored-by: huangguo <hg654321>
1 parent 85ddc97 commit ac34240

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,7 @@ protected void initChannel(Channel ch) {
682682
ch.config().setOption(ChannelOption.SO_SNDBUF, 1);
683683
ch.pipeline().addLast(new Http2FrameCodecBuilder(true).build());
684684
ch.pipeline().addLast(new Http2MultiplexHandler(new ChannelInitializer<Channel>() {
685+
@Override
685686
protected void initChannel(Channel ch) {
686687
ch.pipeline().remove(this);
687688
ch.pipeline().addLast(new MultiplexInboundStream(handlerInactivatedFlushed,

example/src/main/java/io/netty/example/mqtt/heartBeat/MqttHeartBeatBroker.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public static void main(String[] args) throws Exception {
4444
b.option(ChannelOption.SO_BACKLOG, 1024);
4545
b.channel(NioServerSocketChannel.class);
4646
b.childHandler(new ChannelInitializer<SocketChannel>() {
47+
@Override
4748
protected void initChannel(SocketChannel ch) throws Exception {
4849
ch.pipeline().addLast("encoder", MqttEncoder.INSTANCE);
4950
ch.pipeline().addLast("decoder", new MqttDecoder());

example/src/main/java/io/netty/example/mqtt/heartBeat/MqttHeartBeatClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static void main(String[] args) throws Exception {
4646
b.group(workerGroup);
4747
b.channel(NioSocketChannel.class);
4848
b.handler(new ChannelInitializer<SocketChannel>() {
49+
@Override
4950
protected void initChannel(SocketChannel ch) throws Exception {
5051
ch.pipeline().addLast("encoder", MqttEncoder.INSTANCE);
5152
ch.pipeline().addLast("decoder", new MqttDecoder());

0 commit comments

Comments
 (0)