Skip to content

Commit 22af095

Browse files
committed
fix NPE.
1 parent 6544539 commit 22af095

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ boolean shouldUseS2A() {
332332
return false;
333333
}
334334

335+
if (Strings.isNullOrEmpty(mtlsEndpoint())) {
336+
return false;
337+
}
338+
335339
// mTLS via S2A is not supported in any universe other than googleapis.com.
336340
return mtlsEndpoint().contains(Credentials.GOOGLE_DEFAULT_UNIVERSE);
337341
}

0 commit comments

Comments
 (0)