Formatting

see gh-3551
This commit is contained in:
spencergibb
2024-11-19 11:37:37 -05:00
parent 0600b4d268
commit 53310ab35f
4 changed files with 10 additions and 9 deletions

View File

@@ -67,10 +67,10 @@ public abstract class AbstractSslConfigurer<T, S> {
}
protected SslBundle getBundle() {
if(ssl.getSslBundle() == null || ssl.getSslBundle().length() > 0) {
if (ssl.getSslBundle() == null || ssl.getSslBundle().length() > 0) {
return null;
}
if(bundles.getBundleNames().contains(ssl.getSslBundle())) {
if (bundles.getBundleNames().contains(ssl.getSslBundle())) {
return bundles.getBundle(ssl.getSslBundle());
}
return null;

View File

@@ -757,8 +757,7 @@ public class GatewayAutoConfiguration {
@Bean
public HttpClientSslConfigurer httpClientSslConfigurer(ServerProperties serverProperties,
HttpClientProperties httpClientProperties,
SslBundles bundles) {
HttpClientProperties httpClientProperties, SslBundles bundles) {
return new HttpClientSslConfigurer(httpClientProperties.getSsl(), serverProperties, bundles) {
};
}

View File

@@ -32,7 +32,8 @@ public class HttpClientSslConfigurer extends AbstractSslConfigurer<HttpClient, H
private final ServerProperties serverProperties;
public HttpClientSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties, SslBundles bundles) {
public HttpClientSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties,
SslBundles bundles) {
super(sslProperties, bundles);
this.serverProperties = serverProperties;
}
@@ -67,7 +68,7 @@ public class HttpClientSslConfigurer extends AbstractSslConfigurer<HttpClient, H
}
try {
if(bundle != null) {
if (bundle != null) {
sslContextBuilder.keyManager(bundle.getManagers().getKeyManagerFactory());
}
else {

View File

@@ -351,8 +351,7 @@ public class GatewayAutoConfigurationTests {
@Bean
@Primary
CustomSslConfigurer customSslContextFactory(ServerProperties serverProperties,
HttpClientProperties httpClientProperties,
SslBundles bundles) {
HttpClientProperties httpClientProperties, SslBundles bundles) {
return new CustomSslConfigurer(httpClientProperties.getSsl(), serverProperties, bundles);
}
@@ -365,6 +364,7 @@ public class GatewayAutoConfigurationTests {
});
return registry;
}
}
protected static class CustomHttpClientFactory extends HttpClientFactory {
@@ -408,7 +408,8 @@ public class GatewayAutoConfigurationTests {
boolean insecureTrustManagerSet;
protected CustomSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties, SslBundles bundles) {
protected CustomSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties,
SslBundles bundles) {
super(sslProperties, serverProperties, bundles);
}