Skip to content

Commit d2b722a

Browse files
committed
Formatting changes.
1 parent 7f48afa commit d2b722a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

xds/src/test/java/io/grpc/xds/internal/security/CommonTlsContextTestsUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ private static CommonTlsContext.Builder addCertificateValidationContext(
229229
String rootInstanceName,
230230
String rootCertName,
231231
CertificateValidationContext staticCertValidationContext) {
232+
if (staticCertValidationContext == null && rootInstanceName == null) {
233+
return builder;
234+
}
232235
CertificateValidationContext.Builder contextBuilder;
233236
if (staticCertValidationContext == null) {
234237
contextBuilder = CertificateValidationContext.newBuilder();

xds/src/test/java/io/grpc/xds/internal/security/SslContextProviderSupplierTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ public class SslContextProviderSupplierTest {
5454

5555
private void prepareSupplier() {
5656
upstreamTlsContext =
57-
CommonTlsContextTestsUtil.buildUpstreamTlsContext("google_cloud_private_spiffe", true);
57+
CommonTlsContextTestsUtil.buildUpstreamTlsContext("google_cloud_private_spiffe", true);
5858
mockSslContextProvider = mock(SslContextProvider.class);
5959
doReturn(mockSslContextProvider)
60-
.when(mockTlsContextManager)
61-
.findOrCreateClientSslContextProvider(eq(upstreamTlsContext));
60+
.when(mockTlsContextManager)
61+
.findOrCreateClientSslContextProvider(eq(upstreamTlsContext));
6262
supplier = new SslContextProviderSupplier(upstreamTlsContext, mockTlsContextManager);
6363
}
6464

@@ -135,4 +135,4 @@ public void testClose_nullSslContextProvider() {
135135
verify(mockTlsContextManager, times(1))
136136
.findOrCreateClientSslContextProvider(eq(upstreamTlsContext));
137137
}
138-
}
138+
}

0 commit comments

Comments
 (0)