code format & fine-tune

This commit is contained in:
jianghang.loujh
2024-10-14 16:44:59 +08:00
parent 2a7a507987
commit b391188baf
5 changed files with 21 additions and 25 deletions

View File

@@ -107,8 +107,7 @@ public class MysqlConnector {
sslVersion,
sslCipher);
} catch (Exception e) {
logger.info("Can't show SSL status, server may not standard MySQL server: {}", e.toString());
logger.debug("show SSL status exception", e);
logger.warn("Can't show SSL status, server may not standard MySQL server", e);
}
}

View File

@@ -147,8 +147,7 @@ public abstract class BioSocketChannelPool {
ksIS.close();
} catch (IOException e) {
// can't close input stream, but keystore can be properly initialized so we
// shouldn't throw
// this exception
// shouldn't throw this exception
}
}
}
@@ -194,8 +193,7 @@ public abstract class BioSocketChannelPool {
trustStoreIS.close();
} catch (IOException e) {
// can't close input stream, but keystore can be properly initialized so we
// shouldn't throw this
// exception
// shouldn't throw this exception
}
}
}

View File

@@ -29,10 +29,9 @@ public abstract class SocketChannelPool {
public static SocketChannel connectSsl(SocketChannel channel, SslInfo sslInfo) throws IOException {
SslMode sslMode = sslInfo.getSslMode();
String type = chooseSocketChannel();
if ("netty".equalsIgnoreCase(type)) {
throw new UnsupportedOperationException("canal.socketChannel netty not support ssl mode: " + sslMode);
throw new UnsupportedOperationException("canal socketChannel netty not support ssl mode: " + sslMode);
} else {
SocketAddress remoteSocketAddress = channel.getRemoteSocketAddress();
try {