Fix codestyle (#7307)

This commit is contained in:
GuoHao 2021-03-03 15:47:12 +08:00 committed by GitHub
parent 2c51f683a8
commit 346cd716d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 6 deletions

View File

@ -34,7 +34,6 @@ import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.ChannelPromise;
import io.netty.channel.DefaultChannelPromise;
import io.netty.channel.socket.SocketChannel;
import io.netty.util.AbstractReferenceCounted;
import io.netty.util.AttributeKey;
@ -99,7 +98,7 @@ public class Connection extends AbstractReferenceCounted implements ReferenceCou
.remoteAddress(getConnectAddress())
.channel(socketChannelClass());
final ConnectionHandler connectionHandler = new ConnectionHandler(this,bootstrap, TIMER);
final ConnectionHandler connectionHandler = new ConnectionHandler(this, bootstrap, TIMER);
bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectTimeout);
bootstrap.handler(new ChannelInitializer<SocketChannel>() {

View File

@ -51,7 +51,8 @@ public class ConnectionHandler extends ChannelInboundHandlerAdapter {
this.timer = timer;
}
public ChannelPromise connect(){
public ChannelPromise connect() {
final ChannelFuture init = bootstrap.connect();
final DefaultChannelPromise promise = new DefaultChannelPromise(init.channel());
init.addListener(future -> {

View File

@ -47,8 +47,6 @@ import io.netty.handler.codec.http2.Http2NoMoreStreamIdsException;
import io.netty.handler.codec.http2.Http2StreamChannel;
import io.netty.handler.codec.http2.Http2StreamChannelBootstrap;
import io.netty.util.AsciiString;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GenericFutureListener;
import java.io.IOException;
import java.io.InputStream;

View File

@ -21,7 +21,6 @@ import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.remoting.api.Http2WireProtocol;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http2.Http2FrameCodec;