@@ -132,7 +132,7 @@ public static FromChannelCredentialsResult from(ChannelCredentials creds) {
132132 trustManagers = tlsCreds .getTrustManagers ();
133133 } else if (tlsCreds .getRootCertificates () != null ) {
134134 trustManagers = Arrays .asList (CertificateUtils .createTrustManager (
135- new ByteArrayInputStream (tlsCreds .getRootCertificates ())));
135+ new ByteArrayInputStream (tlsCreds .getRootCertificates ())));
136136 } else { // else use system default
137137 TrustManagerFactory tmf = TrustManagerFactory .getInstance (
138138 TrustManagerFactory .getDefaultAlgorithm ());
@@ -265,7 +265,7 @@ public static final class FromChannelCredentialsResult {
265265 public final String error ;
266266
267267 private FromChannelCredentialsResult (ProtocolNegotiator .ClientFactory negotiator ,
268- CallCredentials creds , String error ) {
268+ CallCredentials creds , String error ) {
269269 this .negotiator = negotiator ;
270270 this .callCredentials = creds ;
271271 this .error = error ;
@@ -379,7 +379,7 @@ public ProtocolNegotiator newNegotiator(ObjectPool<? extends Executor> offloadEx
379379 * @param executorPool a dedicated {@link Executor} pool for time-consuming TLS tasks
380380 */
381381 public static ProtocolNegotiator serverTls (final SslContext sslContext ,
382- final ObjectPool <? extends Executor > executorPool ) {
382+ final ObjectPool <? extends Executor > executorPool ) {
383383 Preconditions .checkNotNull (sslContext , "sslContext" );
384384 final Executor executor ;
385385 if (executorPool != null ) {
@@ -428,8 +428,8 @@ static final class ServerTlsHandler extends ChannelInboundHandlerAdapter {
428428 private ProtocolNegotiationEvent pne = ProtocolNegotiationEvent .DEFAULT ;
429429
430430 ServerTlsHandler (ChannelHandler next ,
431- SslContext sslContext ,
432- final ObjectPool <? extends Executor > executorPool ) {
431+ SslContext sslContext ,
432+ final ObjectPool <? extends Executor > executorPool ) {
433433 this .sslContext = Preconditions .checkNotNull (sslContext , "sslContext" );
434434 this .next = Preconditions .checkNotNull (next , "next" );
435435 if (executorPool != null ) {
@@ -486,9 +486,8 @@ private void fireProtocolNegotiationEvent(ChannelHandlerContext ctx, SSLSession
486486 * Returns a {@link ProtocolNegotiator} that does HTTP CONNECT proxy negotiation.
487487 */
488488 public static ProtocolNegotiator httpProxy (final SocketAddress proxyAddress ,
489- final @ Nullable String proxyUsername ,
490- final @ Nullable String proxyPassword ,
491- final ProtocolNegotiator negotiator ) {
489+ final @ Nullable String proxyUsername , final @ Nullable String proxyPassword ,
490+ final ProtocolNegotiator negotiator ) {
492491 Preconditions .checkNotNull (negotiator , "negotiator" );
493492 Preconditions .checkNotNull (proxyAddress , "proxyAddress" );
494493 final AsciiString scheme = negotiator .scheme ();
@@ -565,10 +564,8 @@ protected void userEventTriggered0(ChannelHandlerContext ctx, Object evt) throws
565564 static final class ClientTlsProtocolNegotiator implements ProtocolNegotiator {
566565
567566 public ClientTlsProtocolNegotiator (SslContext sslContext ,
568- ObjectPool <? extends Executor > executorPool ,
569- Optional <Runnable > handshakeCompleteRunnable ,
570- X509TrustManager x509ExtendedTrustManager ,
571- String sni , boolean isXdsTarget ) {
567+ ObjectPool <? extends Executor > executorPool , Optional <Runnable > handshakeCompleteRunnable ,
568+ X509TrustManager x509ExtendedTrustManager , String sni , boolean isXdsTarget ) {
572569 this .sslContext = Preconditions .checkNotNull (sslContext , "sslContext" );
573570 this .executorPool = executorPool ;
574571 if (this .executorPool != null ) {
@@ -628,10 +625,10 @@ static final class ClientTlsHandler extends ProtocolNegotiationHandler {
628625 private SSLEngine sslEngine ;
629626
630627 ClientTlsHandler (ChannelHandler next , SslContext sslContext , String sniHostPort ,
631- Executor executor , ChannelLogger negotiationLogger ,
632- Optional <Runnable > handshakeCompleteRunnable ,
633- ClientTlsProtocolNegotiator clientTlsProtocolNegotiator ,
634- X509TrustManager x509ExtendedTrustManager ) {
628+ Executor executor , ChannelLogger negotiationLogger ,
629+ Optional <Runnable > handshakeCompleteRunnable ,
630+ ClientTlsProtocolNegotiator clientTlsProtocolNegotiator ,
631+ X509TrustManager x509ExtendedTrustManager ) {
635632 super (next , negotiationLogger );
636633 this .sslContext = Preconditions .checkNotNull (sslContext , "sslContext" );
637634 if (!Strings .isNullOrEmpty (sniHostPort )) {
@@ -753,8 +750,8 @@ static HostPort parseAuthority(String authority) {
753750 * @param executorPool a dedicated {@link Executor} pool for time-consuming TLS tasks
754751 */
755752 public static ProtocolNegotiator tls (SslContext sslContext ,
756- ObjectPool <? extends Executor > executorPool , Optional <Runnable > handshakeCompleteRunnable ,
757- X509TrustManager x509ExtendedTrustManager , String sni , boolean isXdsTarget ) {
753+ ObjectPool <? extends Executor > executorPool , Optional <Runnable > handshakeCompleteRunnable ,
754+ X509TrustManager x509ExtendedTrustManager , String sni , boolean isXdsTarget ) {
758755 return new ClientTlsProtocolNegotiator (sslContext , executorPool , handshakeCompleteRunnable ,
759756 x509ExtendedTrustManager , sni , isXdsTarget );
760757 }
@@ -938,7 +935,7 @@ private static RuntimeException unavailableException(String msg) {
938935
939936 @ VisibleForTesting
940937 static void logSslEngineDetails (Level level , ChannelHandlerContext ctx , String msg ,
941- @ Nullable Throwable t ) {
938+ @ Nullable Throwable t ) {
942939 if (!log .isLoggable (level )) {
943940 return ;
944941 }
@@ -1064,8 +1061,8 @@ static final class PlaintextHandler extends ProtocolNegotiationHandler {
10641061 protected void protocolNegotiationEventTriggered (ChannelHandlerContext ctx ) {
10651062 ProtocolNegotiationEvent existingPne = getProtocolNegotiationEvent ();
10661063 Attributes attrs = existingPne .getAttributes ().toBuilder ()
1067- .set (GrpcAttributes .ATTR_AUTHORITY_VERIFIER , (authority ) -> Status .OK )
1068- .build ();
1064+ .set (GrpcAttributes .ATTR_AUTHORITY_VERIFIER , (authority ) -> Status .OK )
1065+ .build ();
10691066 replaceProtocolNegotiationEvent (existingPne .withAttributes (attrs ));
10701067 fireProtocolNegotiationEvent (ctx );
10711068 }
@@ -1127,7 +1124,7 @@ static class ProtocolNegotiationHandler extends ChannelDuplexHandler {
11271124 private final ChannelLogger negotiationLogger ;
11281125
11291126 protected ProtocolNegotiationHandler (ChannelHandler next , String negotiatorName ,
1130- ChannelLogger negotiationLogger ) {
1127+ ChannelLogger negotiationLogger ) {
11311128 this .next = Preconditions .checkNotNull (next , "next" );
11321129 this .negotiatorName = negotiatorName ;
11331130 this .negotiationLogger = Preconditions .checkNotNull (negotiationLogger , "negotiationLogger" );
0 commit comments