Skip to content

Commit 1f9dea2

Browse files
committed
minor clean up
1 parent a81942e commit 1f9dea2

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

providers/netty3/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,17 +363,13 @@ private HttpClientCodec newHttpClientCodec() {
363363
config.getHttpClientCodecMaxChunkSize());
364364
}
365365

366-
public SslHandler createSslHandler(String peerHost, int peerPort) throws GeneralSecurityException, IOException {
366+
private SslHandler createSslHandler(String peerHost, int peerPort) throws GeneralSecurityException, IOException {
367367
SSLEngine sslEngine = sslEngineFactory.newSSLEngine(peerHost, peerPort);
368368
SslHandler sslHandler = handshakeTimeout > 0 ? new SslHandler(sslEngine, getDefaultBufferPool(), false, nettyTimer, handshakeTimeout) : new SslHandler(sslEngine);
369369
sslHandler.setCloseOnSSLException(true);
370370
return sslHandler;
371371
}
372372

373-
public static SslHandler getSslHandler(ChannelPipeline pipeline) {
374-
return (SslHandler) pipeline.get(SSL_HANDLER);
375-
}
376-
377373
public static boolean isSslHandlerConfigured(ChannelPipeline pipeline) {
378374
return pipeline.get(SSL_HANDLER) != null;
379375
}

providers/netty4/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,18 +340,14 @@ private HttpClientCodec newHttpClientCodec() {
340340
false);
341341
}
342342

343-
public SslHandler createSslHandler(String peerHost, int peerPort) throws IOException, GeneralSecurityException {
343+
private SslHandler createSslHandler(String peerHost, int peerPort) throws IOException, GeneralSecurityException {
344344
SSLEngine sslEngine = sslEngineFactory.newSSLEngine(peerHost, peerPort);
345345
SslHandler sslHandler = new SslHandler(sslEngine);
346346
if (handshakeTimeout > 0)
347347
sslHandler.setHandshakeTimeoutMillis(handshakeTimeout);
348348
return sslHandler;
349349
}
350350

351-
public static SslHandler getSslHandler(ChannelPipeline pipeline) {
352-
return (SslHandler) pipeline.get(SSL_HANDLER);
353-
}
354-
355351
public static boolean isSslHandlerConfigured(ChannelPipeline pipeline) {
356352
return pipeline.get(SSL_HANDLER) != null;
357353
}

0 commit comments

Comments
 (0)