Skip to content

Commit 37f6903

Browse files
committed
Polish
Closes gh-27432
2 parents c211c97 + bb26b7b commit 37f6903

File tree

14 files changed

+17
-24
lines changed

14 files changed

+17
-24
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/jetty/JettyMetricsAutoConfiguration.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 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.
@@ -46,25 +46,23 @@
4646
@Configuration(proxyBeanMethods = false)
4747
@ConditionalOnWebApplication
4848
@ConditionalOnClass({ JettyServerThreadPoolMetrics.class, Server.class })
49+
@ConditionalOnBean(MeterRegistry.class)
4950
@AutoConfigureAfter(CompositeMeterRegistryAutoConfiguration.class)
5051
public class JettyMetricsAutoConfiguration {
5152

5253
@Bean
53-
@ConditionalOnBean(MeterRegistry.class)
5454
@ConditionalOnMissingBean({ JettyServerThreadPoolMetrics.class, JettyServerThreadPoolMetricsBinder.class })
5555
public JettyServerThreadPoolMetricsBinder jettyServerThreadPoolMetricsBinder(MeterRegistry meterRegistry) {
5656
return new JettyServerThreadPoolMetricsBinder(meterRegistry);
5757
}
5858

5959
@Bean
60-
@ConditionalOnBean(MeterRegistry.class)
6160
@ConditionalOnMissingBean({ JettyConnectionMetrics.class, JettyConnectionMetricsBinder.class })
6261
public JettyConnectionMetricsBinder jettyConnectionMetricsBinder(MeterRegistry meterRegistry) {
6362
return new JettyConnectionMetricsBinder(meterRegistry);
6463
}
6564

6665
@Bean
67-
@ConditionalOnBean(MeterRegistry.class)
6866
@ConditionalOnMissingBean({ JettySslHandshakeMetrics.class, JettySslHandshakeMetricsBinder.class })
6967
@ConditionalOnProperty(name = "server.ssl.enabled", havingValue = "true")
7068
public JettySslHandshakeMetricsBinder jettySslHandshakeMetricsBinder(MeterRegistry meterRegistry) {

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public void apply(Builder builder) {
185185
assertThat(restTemplate.getForObject(URI.create("/second/456"), String.class)).isEqualTo("OK");
186186
this.registry.get("http.client.requests").tags("uri", "/second/456").timer();
187187
this.mockServer.verify();
188-
189188
}
190189

191190
private static final class TestInterceptor implements ClientHttpRequestInterceptor {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Mono<String> timedPercentiles() {
260260

261261
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
262262

263-
private volatile AtomicBoolean fail = new AtomicBoolean(false);
263+
private final AtomicBoolean fail = new AtomicBoolean(false);
264264

265265
FaultyWebFluxTagsProvider() {
266266
super(true);

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/FaultyWebMvcTagsProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider {
3333

34-
private volatile AtomicBoolean fail = new AtomicBoolean(false);
34+
private final AtomicBoolean fail = new AtomicBoolean(false);
3535

3636
FaultyWebMvcTagsProvider() {
3737
super(true);

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationLettuceWithoutCommonsPool2Tests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @author Stephane Nicoll
3333
*/
3434
@ClassPathExclusions("commons-pool2-*.jar")
35-
public class RedisAutoConfigurationLettuceWithoutCommonsPool2Tests {
35+
class RedisAutoConfigurationLettuceWithoutCommonsPool2Tests {
3636

3737
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
3838
.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class));

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ To disable the auto-configured connection pool metrics, set the following proper
10241024
[[actuator.metrics.supported.jetty]]
10251025
==== Jetty Metrics
10261026
Auto-configuration will bind metrics for Jetty's `ThreadPool` using Micrometer's `JettyServerThreadPoolMetrics`.
1027-
Metrics for Jetty's `Connector`s are bound using Micrometer's `JettyConnectionMetrics` and, in addition when configprop:server.ssl.enabled[] is set to `true`, Micrometer's `JettySslHandshakeMetrics`.
1027+
Metrics for Jetty's ``Connector``s are bound using Micrometer's `JettyConnectionMetrics` and, in addition when configprop:server.ssl.enabled[] is set to `true`, Micrometer's `JettySslHandshakeMetrics`.
10281028

10291029

10301030

spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/cloud.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ See the blog post on https://boxfuse.com/blog/spring-boot-ec2.html[deploying Spr
359359

360360
[[deployment.cloud.azure]]
361361
=== Azure
362-
This https://spring.io/guides/gs/spring-boot-for-azure/[Getting Started guide] walks you through deploying your Spring Boot application to either https://azure.microsoft.com/en-ca/services/spring-cloud/[Azure Spring Cloud] or https://docs.microsoft.com/en-ca/azure/app-service/overview[Azure App Service].
362+
This https://spring.io/guides/gs/spring-boot-for-azure/[Getting Started guide] walks you through deploying your Spring Boot application to either https://azure.microsoft.com/en-us/services/spring-cloud/[Azure Spring Cloud] or https://docs.microsoft.com/en-us/azure/app-service/overview[Azure App Service].
363363

364364

365365

spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/rsocket.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Once the `RSocket` channel is established between server and client, any party c
7373

7474
As a server, you can get injected with an `RSocketRequester` instance on any handler method of an RSocket `@Controller`.
7575
As a client, you need to configure and establish an RSocket connection first.
76-
Spring Boot auto-configures an `RSocketRequester.Builder` for such cases with the expected codecs and apply any `RSocketConnectorConfigurer` bean.
76+
Spring Boot auto-configures an `RSocketRequester.Builder` for such cases with the expected codecs and applies any `RSocketConnectorConfigurer` bean.
7777

7878
The `RSocketRequester.Builder` instance is a prototype bean, meaning each injection point will provide you with a new instance .
7979
This is done on purpose since this builder is stateful and you shouldn't create requesters with different setups using the same instance.

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleValueProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.springframework.boot.configurationsample.ConfigurationProperties;
2525

2626
/**
27-
* Configuration properties using lombok @Value.
27+
* Configuration properties using Lombok {@code @Value}.
2828
*
2929
* @author Mark Jeffrey
3030
*/

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public SpringApplicationBuilder(ResourceLoader resourceLoader, Class<?>... sourc
103103

104104
/**
105105
* Creates a new {@link SpringApplication} instance from the given sources. Subclasses
106-
* may override in order to provide a custom subclass of {@link SpringApplication}
106+
* may override in order to provide a custom subclass of {@link SpringApplication}.
107107
* @param sources the sources
108108
* @return the {@link SpringApplication} instance
109109
* @since 1.1.0
@@ -116,9 +116,9 @@ protected SpringApplication createSpringApplication(Class<?>... sources) {
116116
}
117117

118118
/**
119-
* Creates a new {@link SpringApplication} instances from the given sources using the
119+
* Creates a new {@link SpringApplication} instance from the given sources using the
120120
* given {@link ResourceLoader}. Subclasses may override in order to provide a custom
121-
* subclass of {@link SpringApplication}
121+
* subclass of {@link SpringApplication}.
122122
* @param resourceLoader the resource loader (can be null)
123123
* @param sources the sources
124124
* @return the {@link SpringApplication} instance

0 commit comments

Comments
 (0)