Skip to content

Commit

Permalink
Fix test and some mistakes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kannanjgithub committed Feb 21, 2025
1 parent 7ecbf56 commit e7c7913
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private GrpcHttp2OutboundHeaders(AsciiString[] preHeaders, byte[][] serializedMe
@Override
public CharSequence authority() {
for (int i = 0; i < preHeaders.length / 2; i++) {
if (preHeaders[i].equals(Http2Headers.PseudoHeaderName.AUTHORITY.value())) {
if (preHeaders[i * 2].equals(Http2Headers.PseudoHeaderName.AUTHORITY.value())) {
return preHeaders[i * 2 + 1];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ final class X509AuthorityVerifier implements AuthorityVerifier {
}

public X509AuthorityVerifier(SSLEngine sslEngine, X509TrustManager x509ExtendedTrustManager) {
this.sslEngine = checkNotNull(sslEngine);
this.sslEngine = checkNotNull(sslEngine, "sslEngine");
this.x509ExtendedTrustManager = x509ExtendedTrustManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ public void authorityOverrideInCallOptions_noX509ExtendedTrustManager_newStreamC
} catch (ExecutionException ex) {
Status status = ((StatusException) ex.getCause()).getStatus();
assertThat(status.getDescription()).isEqualTo("Can't allow authority override in rpc "
+ "when SslEngine or X509ExtendedTrustManager is not available");
+ "when X509ExtendedTrustManager is not available");
assertThat(status.getCode()).isEqualTo(Code.UNAVAILABLE);
}
} finally {
Expand Down

0 comments on commit e7c7913

Please sign in to comment.