Skip to content

Commit b234501

Browse files
committed
Polish
1 parent 62d9d0f commit b234501

File tree

38 files changed

+142
-134
lines changed

38 files changed

+142
-134
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscoverer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ public class CloudFoundryWebEndpointDiscoverer extends WebEndpointDiscoverer {
5151
*/
5252
public CloudFoundryWebEndpointDiscoverer(ApplicationContext applicationContext,
5353
ParameterValueMapper parameterValueMapper,
54-
EndpointMediaTypes endpointMediaTypes,
55-
PathMapper endpointPathMapper,
54+
EndpointMediaTypes endpointMediaTypes, PathMapper endpointPathMapper,
5655
Collection<OperationInvokerAdvisor> invokerAdvisors,
5756
Collection<EndpointFilter<ExposableWebEndpoint>> filters) {
5857
super(applicationContext, parameterValueMapper, endpointMediaTypes,

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/MappingWebEndpointPathMapper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import org.springframework.boot.actuate.endpoint.web.PathMapper;
2222

2323
/**
24-
* A {@link PathMapper} implementation that uses a simple {@link Map} to
25-
* determine the endpoint path.
24+
* A {@link PathMapper} implementation that uses a simple {@link Map} to determine the
25+
* endpoint path.
2626
*
2727
* @author Stephane Nicoll
2828
*/

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/cache/CacheMetricsRegistrarConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class CacheMetricsRegistrarConfiguration {
6565

6666
@Bean
6767
public CacheMetricsRegistrar cacheMetricsRegistrar() {
68-
return new CacheMetricsRegistrar(this.registry,
69-
this.properties.getMetricName(), this.binderProviders);
68+
return new CacheMetricsRegistrar(this.registry, this.properties.getMetricName(),
69+
this.binderProviders);
7070
}
7171

7272
@PostConstruct

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscovererTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ private void load(Class<?> configuration,
6868
this.load((id) -> null, (id) -> id, configuration, consumer);
6969
}
7070

71-
private void load(Function<String, Long> timeToLive,
72-
PathMapper endpointPathMapper, Class<?> configuration,
71+
private void load(Function<String, Long> timeToLive, PathMapper endpointPathMapper,
72+
Class<?> configuration,
7373
Consumer<CloudFoundryWebEndpointDiscoverer> consumer) {
7474
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
7575
configuration);

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityInterceptorTests.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public class ReactiveCloudFoundrySecurityInterceptorTests {
5454
@Before
5555
public void setup() {
5656
MockitoAnnotations.initMocks(this);
57-
this.interceptor = new CloudFoundrySecurityInterceptor(
58-
this.tokenValidator, this.securityService, "my-app-id");
57+
this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator,
58+
this.securityService, "my-app-id");
5959
}
6060

6161
@Test
@@ -90,8 +90,8 @@ public void preHandleWhenTokenIsNotBearerShouldReturnMissingAuthorization() {
9090

9191
@Test
9292
public void preHandleWhenApplicationIdIsNullShouldReturnError() {
93-
this.interceptor = new CloudFoundrySecurityInterceptor(
94-
this.tokenValidator, this.securityService, null);
93+
this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator,
94+
this.securityService, null);
9595
MockServerWebExchange request = MockServerWebExchange
9696
.from(MockServerHttpRequest.get("/a")
9797
.header(HttpHeaders.AUTHORIZATION, "bearer " + mockAccessToken())
@@ -105,8 +105,8 @@ public void preHandleWhenApplicationIdIsNullShouldReturnError() {
105105

106106
@Test
107107
public void preHandleWhenCloudFoundrySecurityServiceIsNullShouldReturnError() {
108-
this.interceptor = new CloudFoundrySecurityInterceptor(
109-
this.tokenValidator, null, "my-app-id");
108+
this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator, null,
109+
"my-app-id");
110110
MockServerWebExchange request = MockServerWebExchange.from(MockServerHttpRequest
111111
.get("/a").header(HttpHeaders.AUTHORIZATION, mockAccessToken()).build());
112112
StepVerifier.create(this.interceptor.preHandle(request, "/a"))

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/cache/CacheMetricsConfigurationTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public void autoConfiguredCacheManagerIsInstrumented() {
5858
@Test
5959
public void autoConfiguredCacheManagerWithCustomMetricName() {
6060
this.contextRunner
61-
.withPropertyValues(
62-
"management.metrics.cache.metric-name=custom.name",
61+
.withPropertyValues("management.metrics.cache.metric-name=custom.name",
6362
"spring.cache.type=caffeine", "spring.cache.cache-names=cache1")
6463
.run((context) -> {
6564
MeterRegistry registry = context.getBean(MeterRegistry.class);

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoke/MissingParametersException.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public MissingParametersException(Set<OperationParameter> missingParameters) {
3838
super("Failed to invoke operation because the following required "
3939
+ "parameters were missing: "
4040
+ StringUtils.collectionToCommaDelimitedString(missingParameters),
41-
"Missing parameters: " + missingParameters.stream()
42-
.map(OperationParameter::getName)
43-
.collect(Collectors.joining(",")));
41+
"Missing parameters: "
42+
+ missingParameters.stream().map(OperationParameter::getName)
43+
.collect(Collectors.joining(",")));
4444
this.missingParameters = missingParameters;
4545
}
4646

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/ControllerEndpoint.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
import org.springframework.web.bind.annotation.PostMapping;
3434

3535
/**
36-
* Identifies a type as being an endpoint that is only exposed over Spring MVC or
37-
* Spring WebFlux. Mapped methods must be annotated with {@link GetMapping @GetMapping},
36+
* Identifies a type as being an endpoint that is only exposed over Spring MVC or Spring
37+
* WebFlux. Mapped methods must be annotated with {@link GetMapping @GetMapping},
3838
* {@link PostMapping @PostMapping}, {@link DeleteMapping @DeleteMapping}, etc annotations
3939
* rather than {@link ReadOperation @ReadOperation},
4040
* {@link WriteOperation @WriteOperation}, {@link DeleteOperation @DeleteOperation}.

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/ControllerEndpointDiscoverer.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
import org.springframework.util.Assert;
3232

3333
/**
34-
* {@link EndpointDiscoverer} for {@link ExposableControllerEndpoint controller endpoints}.
34+
* {@link EndpointDiscoverer} for {@link ExposableControllerEndpoint controller
35+
* endpoints}.
3536
*
3637
* @author Phillip Webb
3738
* @since 2.0.0

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ private Map<String, String> getTemplateVariables(ServerWebExchange exchange) {
288288
private Mono<ResponseEntity<Object>> handleResult(Publisher<?> result,
289289
HttpMethod httpMethod) {
290290
return Mono.from(result).map(this::toResponseEntity)
291-
.onErrorMap(InvalidEndpointRequestException.class, (ex) ->
292-
new ResponseStatusException(HttpStatus.BAD_REQUEST,
291+
.onErrorMap(InvalidEndpointRequestException.class,
292+
(ex) -> new ResponseStatusException(HttpStatus.BAD_REQUEST,
293293
ex.getReason()))
294294
.defaultIfEmpty(new ResponseEntity<>(httpMethod == HttpMethod.GET
295295
? HttpStatus.NOT_FOUND : HttpStatus.NO_CONTENT));

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMapping.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ public ControllerEndpointHandlerMapping(EndpointMapping endpointMapping,
7272
private Map<Object, ExposableControllerEndpoint> getHandlers(
7373
Collection<ExposableControllerEndpoint> endpoints) {
7474
Map<Object, ExposableControllerEndpoint> handlers = new LinkedHashMap<>();
75-
endpoints
76-
.forEach((endpoint) -> handlers.put(endpoint.getController(), endpoint));
75+
endpoints.forEach((endpoint) -> handlers.put(endpoint.getController(), endpoint));
7776
return Collections.unmodifiableMap(handlers);
7877
}
7978

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMapping.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ public ControllerEndpointHandlerMapping(EndpointMapping endpointMapping,
7373
private Map<Object, ExposableControllerEndpoint> getHandlers(
7474
Collection<ExposableControllerEndpoint> endpoints) {
7575
Map<Object, ExposableControllerEndpoint> handlers = new LinkedHashMap<>();
76-
endpoints
77-
.forEach((endpoint) -> handlers.put(endpoint.getController(), endpoint));
76+
endpoints.forEach((endpoint) -> handlers.put(endpoint.getController(), endpoint));
7877
return Collections.unmodifiableMap(handlers);
7978
}
8079

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/RouterFunctionMetrics.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,12 +75,12 @@ public HandlerFilterFunction<ServerResponse, ServerResponse> timer(String name,
7575
Iterable<Tag> tags) {
7676
return (request, next) -> {
7777
final long start = System.nanoTime();
78-
return next.handle(request).doOnSuccess(response -> {
78+
return next.handle(request).doOnSuccess((response) -> {
7979
Iterable<Tag> allTags = Tags.concat(tags,
8080
this.defaultTags.apply(request, response));
8181
this.registry.timer(name, allTags).record(System.nanoTime() - start,
8282
TimeUnit.NANOSECONDS);
83-
}).doOnError(error -> {
83+
}).doOnError((error) -> {
8484
// FIXME how do we get the response under an error condition?
8585
Iterable<Tag> allTags = Tags.concat(tags,
8686
this.defaultTags.apply(request, null));

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/beans/BeansEndpointTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void beansInParentContextAreFound() {
9999
parentRunner.run((parent) -> {
100100
new ApplicationContextRunner()
101101
.withUserConfiguration(EndpointConfiguration.class).withParent(parent)
102-
.run(child -> {
102+
.run((child) -> {
103103
ApplicationBeans result = child.getBean(BeansEndpoint.class).beans();
104104
assertThat(result.getContexts().get(parent.getId()).getBeans())
105105
.containsKey("bean");

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointParentTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void configurationPropertiesClass() {
4242
.run((parent) -> {
4343
new ApplicationContextRunner()
4444
.withUserConfiguration(ClassConfigurationProperties.class)
45-
.withParent(parent).run(child -> {
45+
.withParent(parent).run((child) -> {
4646
ConfigurationPropertiesReportEndpoint endpoint = child
4747
.getBean(ConfigurationPropertiesReportEndpoint.class);
4848
ApplicationConfigurationProperties applicationProperties = endpoint
@@ -65,7 +65,7 @@ public void configurationPropertiesBeanMethod() {
6565
new ApplicationContextRunner()
6666
.withUserConfiguration(
6767
BeanMethodConfigurationProperties.class)
68-
.withParent(parent).run(child -> {
68+
.withParent(parent).run((child) -> {
6969
ConfigurationPropertiesReportEndpoint endpoint = child
7070
.getBean(ConfigurationPropertiesReportEndpoint.class);
7171
ApplicationConfigurationProperties applicationProperties = endpoint

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/AbstractWebEndpointIntegrationTests.java

+6-9
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ public void readOperationWithListQueryParameterAndMultipleValues() {
159159
@Test
160160
public void readOperationWithMappingFailureProducesBadRequestResponse() {
161161
load(QueryEndpointConfiguration.class, (client) -> {
162-
WebTestClient.BodyContentSpec body = client.get()
163-
.uri("/query?two=two").exchange().expectStatus().isBadRequest()
164-
.expectBody();
162+
WebTestClient.BodyContentSpec body = client.get().uri("/query?two=two")
163+
.exchange().expectStatus().isBadRequest().expectBody();
165164
validateErrorBody(body, HttpStatus.BAD_REQUEST, "/endpoints/query",
166165
"Missing parameters: one");
167166
});
@@ -282,9 +281,8 @@ public void readOperationWithCustomMediaType() {
282281
@Test
283282
public void readOperationWithMissingRequiredParametersReturnsBadRequestResponse() {
284283
load(RequiredParameterEndpointConfiguration.class, (client) -> {
285-
WebTestClient.BodyContentSpec body = client.get()
286-
.uri("/requiredparameters").exchange().expectStatus().isBadRequest()
287-
.expectBody();
284+
WebTestClient.BodyContentSpec body = client.get().uri("/requiredparameters")
285+
.exchange().expectStatus().isBadRequest().expectBody();
288286
validateErrorBody(body, HttpStatus.BAD_REQUEST,
289287
"/endpoints/requiredparameters", "Missing parameters: foo");
290288
});
@@ -334,9 +332,8 @@ public void linksProducesSecondaryMediaTypeWhenRequested() {
334332

335333
protected void validateErrorBody(WebTestClient.BodyContentSpec body,
336334
HttpStatus status, String path, String message) {
337-
body.jsonPath("status").isEqualTo(status.value())
338-
.jsonPath("error").isEqualTo(status.getReasonPhrase())
339-
.jsonPath("path").isEqualTo(path)
335+
body.jsonPath("status").isEqualTo(status.value()).jsonPath("error")
336+
.isEqualTo(status.getReasonPhrase()).jsonPath("path").isEqualTo(path)
340337
.jsonPath("message").isEqualTo(message);
341338
}
342339

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/BaseConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public WebEndpointDiscoverer webEndpointDiscoverer(
6868
ParameterValueMapper parameterMapper = new ConversionServiceParameterValueMapper(
6969
DefaultConversionService.getSharedInstance());
7070
return new WebEndpointDiscoverer(applicationContext, parameterMapper,
71-
endpointMediaTypes(), PathMapper.useEndpointId(),
72-
Collections.emptyList(), Collections.emptyList());
71+
endpointMediaTypes(), PathMapper.useEndpointId(), Collections.emptyList(),
72+
Collections.emptyList());
7373
}
7474

7575
@Bean

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ private Condition<List<? extends WebOperationRequestPredicate>> requestPredicate
298298
Map<WebOperationRequestPredicate, Long> matchCounts = new HashMap<>();
299299
for (WebOperationRequestPredicate predicate : predicates) {
300300
matchCounts.put(predicate, Stream.of(matchers)
301-
.filter(matcher -> matcher.matches(predicate)).count());
301+
.filter((matcher) -> matcher.matches(predicate)).count());
302302
}
303-
return matchCounts.values().stream().noneMatch(count -> count != 1);
303+
return matchCounts.values().stream().noneMatch((count) -> count != 1);
304304
}, Arrays.toString(matchers));
305305
}
306306

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/integration/SpringIntegrationMetricsIntegrationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -100,7 +100,7 @@ public IntegrationFlow convert() {
100100
(e) -> e.id("toJson"))
101101
.handle(String.class, this::fahrenheitToCelsius,
102102
(e) -> e.id("temperatureConverter"))
103-
.transform(this::extractResult, e -> e.id("toResponse"));
103+
.transform(this::extractResult, (e) -> e.id("toResponse"));
104104
}
105105

106106
private double extractResult(String json) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ else if (this.flywayDataSource != null) {
157157
private String getProperty(Supplier<String> property,
158158
Supplier<String> defaultValue) {
159159
String value = property.get();
160-
return value == null ? defaultValue.get() : value;
160+
return (value == null ? defaultValue.get() : value);
161161
}
162162

163163
private void checkLocationExists(String... locations) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/jetty/JettyCustomizer.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,19 @@ public static void customizeJetty(ServerProperties serverProperties,
5757
propertyMapper.from(jettyProperties::getSelectors).whenNonNull()
5858
.to(factory::setSelectors);
5959
propertyMapper.from(serverProperties::getMaxHttpHeaderSize)
60-
.when(JettyCustomizer::isPositive).to(maxHttpHeaderSize ->
61-
customizeMaxHttpHeaderSize(factory, maxHttpHeaderSize));
60+
.when(JettyCustomizer::isPositive)
61+
.to((maxHttpHeaderSize) -> customizeMaxHttpHeaderSize(factory,
62+
maxHttpHeaderSize));
6263
propertyMapper.from(jettyProperties::getMaxHttpPostSize)
6364
.when(JettyCustomizer::isPositive)
64-
.to(maxHttpPostSize -> customizeMaxHttpPostSize(factory, maxHttpPostSize));
65+
.to((maxHttpPostSize) -> customizeMaxHttpPostSize(factory,
66+
maxHttpPostSize));
6567
propertyMapper.from(serverProperties::getConnectionTimeout).whenNonNull()
66-
.to(connectionTimeout -> customizeConnectionTimeout(factory, connectionTimeout));
68+
.to((connectionTimeout) -> customizeConnectionTimeout(factory,
69+
connectionTimeout));
6770
propertyMapper.from(jettyProperties::getAccesslog)
6871
.when(ServerProperties.Jetty.Accesslog::isEnabled)
69-
.to(accesslog -> customizeAccessLog(factory, accesslog));
72+
.to((accesslog) -> customizeAccessLog(factory, accesslog));
7073
}
7174

7275
private static boolean isPositive(Integer value) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/tomcat/TomcatCustomizer.java

+17-10
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,35 @@ public static void customizeTomcat(ServerProperties serverProperties,
5858
customizeRemoteIpValve(serverProperties, environment, factory);
5959
propertyMapper.from(tomcatProperties::getMaxThreads)
6060
.when(TomcatCustomizer::isPositive)
61-
.to(maxThreads -> customizeMaxThreads(factory, tomcatProperties.getMaxThreads()));
61+
.to((maxThreads) -> customizeMaxThreads(factory,
62+
tomcatProperties.getMaxThreads()));
6263
propertyMapper.from(tomcatProperties::getMinSpareThreads)
6364
.when(TomcatCustomizer::isPositive)
64-
.to(minSpareThreads -> customizeMinThreads(factory, minSpareThreads));
65-
propertyMapper.from(() -> determineMaxHttpHeaderSize(serverProperties, tomcatProperties))
65+
.to((minSpareThreads) -> customizeMinThreads(factory, minSpareThreads));
66+
propertyMapper
67+
.from(() -> determineMaxHttpHeaderSize(serverProperties,
68+
tomcatProperties))
6669
.when(TomcatCustomizer::isPositive)
67-
.to(maxHttpHeaderSize -> customizeMaxHttpHeaderSize(factory, maxHttpHeaderSize));
70+
.to((maxHttpHeaderSize) -> customizeMaxHttpHeaderSize(factory,
71+
maxHttpHeaderSize));
6872
propertyMapper.from(tomcatProperties::getMaxHttpPostSize)
69-
.when(maxHttpPostSize -> maxHttpPostSize != 0)
70-
.to(maxHttpPostSize -> customizeMaxHttpPostSize(factory, maxHttpPostSize));
73+
.when((maxHttpPostSize) -> maxHttpPostSize != 0)
74+
.to((maxHttpPostSize) -> customizeMaxHttpPostSize(factory,
75+
maxHttpPostSize));
7176
propertyMapper.from(tomcatProperties::getAccesslog)
7277
.when(ServerProperties.Tomcat.Accesslog::isEnabled)
73-
.to(enabled -> customizeAccessLog(tomcatProperties, factory));
78+
.to((enabled) -> customizeAccessLog(tomcatProperties, factory));
7479
propertyMapper.from(tomcatProperties::getUriEncoding).whenNonNull()
7580
.to(factory::setUriEncoding);
7681
propertyMapper.from(serverProperties::getConnectionTimeout).whenNonNull()
77-
.to(connectionTimeout -> customizeConnectionTimeout(factory, connectionTimeout));
82+
.to((connectionTimeout) -> customizeConnectionTimeout(factory,
83+
connectionTimeout));
7884
propertyMapper.from(tomcatProperties::getMaxConnections)
7985
.when(TomcatCustomizer::isPositive)
80-
.to(maxConnections -> customizeMaxConnections(factory, maxConnections));
86+
.to((maxConnections) -> customizeMaxConnections(factory, maxConnections));
8187
propertyMapper.from(tomcatProperties::getAcceptCount)
8288
.when(TomcatCustomizer::isPositive)
83-
.to(acceptCount -> customizeAcceptCount(factory, acceptCount));
89+
.to((acceptCount) -> customizeAcceptCount(factory, acceptCount));
8490
customizeStaticResources(serverProperties.getTomcat().getResource(), factory);
8591
}
8692

@@ -234,4 +240,5 @@ private static void customizeStaticResources(
234240
});
235241
});
236242
}
243+
237244
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/undertow/UndertowCustomizer.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@ public static void customizeUndertow(ServerProperties serverProperties,
6363
.to(factory::setAccessLogSuffix);
6464
propertyMapper.from(accesslogProperties::isRotate)
6565
.to(factory::setAccessLogRotate);
66-
propertyMapper.from(() ->
67-
getOrDeduceUseForwardHeaders(serverProperties, environment)).to(
68-
factory::setUseForwardHeaders);
66+
propertyMapper
67+
.from(() -> getOrDeduceUseForwardHeaders(serverProperties, environment))
68+
.to(factory::setUseForwardHeaders);
6969
propertyMapper.from(serverProperties::getMaxHttpHeaderSize)
7070
.when(UndertowCustomizer::isPositive)
71-
.to(maxHttpHeaderSize ->
72-
customizeMaxHttpHeaderSize(factory, maxHttpHeaderSize));
71+
.to((maxHttpHeaderSize) -> customizeMaxHttpHeaderSize(factory,
72+
maxHttpHeaderSize));
7373
propertyMapper.from(undertowProperties::getMaxHttpPostSize)
7474
.when(UndertowCustomizer::isPositive)
75-
.to(maxHttpPostSize ->
76-
customizeMaxHttpPostSize(factory, maxHttpPostSize));
75+
.to((maxHttpPostSize) -> customizeMaxHttpPostSize(factory,
76+
maxHttpPostSize));
7777
propertyMapper.from(serverProperties::getConnectionTimeout)
78-
.to(connectionTimeout ->
79-
customizeConnectionTimeout(factory, connectionTimeout));
80-
factory.addDeploymentInfoCustomizers(deploymentInfo -> deploymentInfo
78+
.to((connectionTimeout) -> customizeConnectionTimeout(factory,
79+
connectionTimeout));
80+
factory.addDeploymentInfoCustomizers((deploymentInfo) -> deploymentInfo
8181
.setEagerFilterInit(undertowProperties.isEagerFilterInit()));
8282
}
8383

0 commit comments

Comments
 (0)