Skip to content

Commit 3b1d2b0

Browse files
committed
Merge pull request #11126 from Johnny Lim
* gh-11126: Polish
2 parents 97bb70c + 01a4841 commit 3b1d2b0

File tree

13 files changed

+18
-26
lines changed

13 files changed

+18
-26
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import org.springframework.core.env.Environment;
2323

2424
/**
25-
* Default {@link EndpointPathResolver} implementation that use the {@link Environment} to
26-
* determine if an endpoint has a custom path.
25+
* Default {@link EndpointPathResolver} implementation that uses the {@link Environment}
26+
* to determine if an endpoint has a custom path.
2727
*
2828
* @author Stephane Nicoll
2929
*/

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class ThymeleafProperties {
6363
private String suffix = DEFAULT_SUFFIX;
6464

6565
/**
66-
* Template mode to be applied to templates. See also Thymleaf's TemplateMode enum.
66+
* Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum.
6767
*/
6868
private String mode = "HTML";
6969

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ private List<ServerAddress> extractServerAddresses(MongoClient client) {
136136
Cluster cluster = (Cluster) ReflectionTestUtils.getField(client, "cluster");
137137
ClusterSettings clusterSettings = (ClusterSettings) ReflectionTestUtils
138138
.getField(cluster, "settings");
139-
List<ServerAddress> allAddresses = clusterSettings.getHosts();
140-
return allAddresses;
139+
return clusterSettings.getHosts();
141140
}
142141

143142
private void assertServerAddress(ServerAddress serverAddress, String expectedHost,

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoPropertiesTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ private List<ServerAddress> extractServerAddresses(MongoClient client) {
163163
Cluster cluster = (Cluster) ReflectionTestUtils.getField(client, "cluster");
164164
ClusterSettings clusterSettings = (ClusterSettings) ReflectionTestUtils
165165
.getField(cluster, "settings");
166-
List<ServerAddress> allAddresses = clusterSettings.getHosts();
167-
return allAddresses;
166+
return clusterSettings.getHosts();
168167
}
169168

170169
private void assertServerAddress(ServerAddress serverAddress, String expectedHost,

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ private MongoClient createMongoClient(MongoProperties properties,
175175
private List<ServerAddress> extractServerAddresses(MongoClient client) {
176176
MongoClientSettings settings = client.getSettings();
177177
ClusterSettings clusterSettings = settings.getClusterSettings();
178-
List<ServerAddress> allAddresses = clusterSettings.getHosts();
179-
return allAddresses;
178+
return clusterSettings.getHosts();
180179
}
181180

182181
private List<MongoCredential> extractMongoCredentials(MongoClient client) {

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818

1919
import java.time.Duration;
2020

21-
import org.junit.Rule;
2221
import org.junit.Test;
23-
import org.junit.rules.ExpectedException;
2422

2523
import org.springframework.boot.autoconfigure.web.ResourceProperties.Cache;
2624
import org.springframework.boot.testsupport.assertj.Matched;
@@ -39,9 +37,6 @@ public class ResourcePropertiesTests {
3937

4038
private final ResourceProperties properties = new ResourceProperties();
4139

42-
@Rule
43-
public ExpectedException thrown = ExpectedException.none();
44-
4540
@Test
4641
public void resourceChainNoCustomization() {
4742
assertThat(this.properties.getChain().getEnabled()).isNull();

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ content into your application. Rather, pick only the properties that you need.
469469
spring.thymeleaf.enable-spring-el-compiler=false # Enable the SpringEL compiler in SpringEL expressions.
470470
spring.thymeleaf.encoding=UTF-8 # Template files encoding.
471471
spring.thymeleaf.excluded-view-names= # Comma-separated list of view names that should be excluded from resolution.
472-
spring.thymeleaf.mode=HTML5 # Template mode to be applied to templates. See also Thymleaf's TemplateMode enum.
472+
spring.thymeleaf.mode=HTML5 # Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum.
473473
spring.thymeleaf.prefix=classpath:/templates/ # Prefix that gets prepended to view names when building a URL.
474474
spring.thymeleaf.reactive.chunked-mode-view-names= # Comma-separated list of view names (patterns allowed) that should be the only ones executed in CHUNKED mode when a max chunk size is set.
475475
spring.thymeleaf.reactive.full-mode-view-names= # Comma-separated list of view names (patterns allowed) that should be executed in FULL mode even if a max chunk size is set.

spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ register an `EndpointFilter` bean.
183183
=== Securing HTTP Endpoints
184184
You should take care to secure HTTP endpoints in the same way that you would any other
185185
sensitive URL. Spring Boot will not apply any security on your behalf, however, it does
186-
provide some convenient `RequestMatcher`s that can be used in combination with Spring
186+
provide some convenient ``RequestMatcher``s that can be used in combination with Spring
187187
Security.
188188

189189
A typical Spring Security configuration could look something like this:

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Maven or Gradle would but without requiring you to use a build tool.
132132

133133
Spring Boot extends this technique further and tries to deduce which libraries to "`grab`"
134134
based on your code. For example, since the `WebApplication` code shown previously uses
135-
`@RestController` annotations, Spring Boot grabs"`Tomcat`" and "`Spring MVC`".
135+
`@RestController` annotations, Spring Boot grabs "Tomcat" and "Spring MVC".
136136

137137
The following items are used as "`grab hints`":
138138

@@ -254,7 +254,7 @@ line:
254254

255255
[source,java,indent=0]
256256
----
257-
`@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')`.
257+
@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')
258258
----
259259

260260

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,8 +1596,8 @@ configuration (for example, `logback-spring.xml` rather than `logback.xml`). If
15961596
standard configuration locations, Spring cannot completely control log initialization.
15971597

15981598
WARNING: There are known classloading issues with Java Util Logging that cause problems
1599-
when running from an '`executable jar`'. We recommend that you avoid it when running from
1600-
an '`executable jar`'if at all possible.
1599+
when running from an 'executable jar'. We recommend that you avoid it when running from
1600+
an 'executable jar' if at all possible.
16011601

16021602
To help with the customization, some other properties are transferred from the Spring
16031603
`Environment` to System properties, as described in the following table:
@@ -5949,7 +5949,7 @@ To test that object JSON serialization and deserialization is working as expecte
59495949
use the `@JsonTest` annotation. `@JsonTest` auto-configures the available supported JSON
59505950
mapper, which can be one of the following libraries:
59515951

5952-
* Jackson `ObjectMapper`, any `@JsonComponent` beans and any Jackson `Modules`
5952+
* Jackson `ObjectMapper`, any `@JsonComponent` beans and any Jackson ``Module``s
59535953
* `Gson`
59545954
* `Jsonb`
59555955

@@ -6215,7 +6215,7 @@ bean, which provides an alternative to the standard JPA `EntityManager` that is
62156215
specifically designed for tests. If you want to use `TestEntityManager` outside of
62166216
`@DataJpaTest` instances, you can also use the `@AutoConfigureTestEntityManager`
62176217
annotation. A `JdbcTemplate` is also available if you need that. The following example
6218-
shows the `@DataJpaTest`annotation in use:
6218+
shows the `@DataJpaTest` annotation in use:
62196219

62206220
[source,java,indent=0]
62216221
----

spring-boot-project/spring-boot-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<description>Spring Boot Parent</description>
1515
<organization>
1616
<name>Pivotal Software, Inc.</name>
17-
<url>http://www.spring.io</url>
17+
<url>https://spring.io</url>
1818
</organization>
1919
<properties>
2020
<main.basedir>${basedir}/../..</main.basedir>

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationTemp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private File getTempDirectory() {
9090
String property = System.getProperty("java.io.tmpdir");
9191
Assert.state(StringUtils.hasLength(property), "No 'java.io.tmpdir' property set");
9292
File file = new File(property);
93-
Assert.state(file.exists(), () -> "Temp directory" + file + " does not exist");
93+
Assert.state(file.exists(), () -> "Temp directory " + file + " does not exist");
9494
Assert.state(file.isDirectory(),
9595
() -> "Temp location " + file + " is not a directory");
9696
return file;

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ public void registerListener() throws Exception {
784784
SpringApplication application = new SpringApplication(ExampleConfig.class,
785785
ListenerConfig.class);
786786
application.setApplicationContextClass(SpyApplicationContext.class);
787-
final LinkedHashSet<ApplicationEvent> events = new LinkedHashSet<>();
787+
Set<ApplicationEvent> events = new LinkedHashSet<>();
788788
application.addListeners((ApplicationListener<ApplicationEvent>) events::add);
789789
this.context = application.run();
790790
assertThat(events).hasAtLeastOneElementOfType(ApplicationPreparedEvent.class);
@@ -797,7 +797,7 @@ public void registerListenerWithCustomMulticaster() throws Exception {
797797
SpringApplication application = new SpringApplication(ExampleConfig.class,
798798
ListenerConfig.class, Multicaster.class);
799799
application.setApplicationContextClass(SpyApplicationContext.class);
800-
final LinkedHashSet<ApplicationEvent> events = new LinkedHashSet<>();
800+
Set<ApplicationEvent> events = new LinkedHashSet<>();
801801
application.addListeners((ApplicationListener<ApplicationEvent>) events::add);
802802
this.context = application.run();
803803
assertThat(events).hasAtLeastOneElementOfType(ApplicationPreparedEvent.class);

0 commit comments

Comments
 (0)