Commit 01a48412 authored by Johnny Lim's avatar Johnny Lim Committed by Andy Wilkinson

Polish

Closes gh-11126
parent 97bb70cd
......@@ -22,8 +22,8 @@ import org.springframework.boot.actuate.endpoint.web.EndpointPathResolver;
import org.springframework.core.env.Environment;
/**
* Default {@link EndpointPathResolver} implementation that use the {@link Environment} to
* determine if an endpoint has a custom path.
* Default {@link EndpointPathResolver} implementation that uses the {@link Environment}
* to determine if an endpoint has a custom path.
*
* @author Stephane Nicoll
*/
......
......@@ -63,7 +63,7 @@ public class ThymeleafProperties {
private String suffix = DEFAULT_SUFFIX;
/**
* Template mode to be applied to templates. See also Thymleaf's TemplateMode enum.
* Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum.
*/
private String mode = "HTML";
......
......@@ -136,8 +136,7 @@ public class MongoClientFactoryTests {
Cluster cluster = (Cluster) ReflectionTestUtils.getField(client, "cluster");
ClusterSettings clusterSettings = (ClusterSettings) ReflectionTestUtils
.getField(cluster, "settings");
List<ServerAddress> allAddresses = clusterSettings.getHosts();
return allAddresses;
return clusterSettings.getHosts();
}
private void assertServerAddress(ServerAddress serverAddress, String expectedHost,
......
......@@ -163,8 +163,7 @@ public class MongoPropertiesTests {
Cluster cluster = (Cluster) ReflectionTestUtils.getField(client, "cluster");
ClusterSettings clusterSettings = (ClusterSettings) ReflectionTestUtils
.getField(cluster, "settings");
List<ServerAddress> allAddresses = clusterSettings.getHosts();
return allAddresses;
return clusterSettings.getHosts();
}
private void assertServerAddress(ServerAddress serverAddress, String expectedHost,
......
......@@ -175,8 +175,7 @@ public class ReactiveMongoClientFactoryTests {
private List<ServerAddress> extractServerAddresses(MongoClient client) {
MongoClientSettings settings = client.getSettings();
ClusterSettings clusterSettings = settings.getClusterSettings();
List<ServerAddress> allAddresses = clusterSettings.getHosts();
return allAddresses;
return clusterSettings.getHosts();
}
private List<MongoCredential> extractMongoCredentials(MongoClient client) {
......
......@@ -18,9 +18,7 @@ package org.springframework.boot.autoconfigure.web;
import java.time.Duration;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.autoconfigure.web.ResourceProperties.Cache;
import org.springframework.boot.testsupport.assertj.Matched;
......@@ -39,9 +37,6 @@ public class ResourcePropertiesTests {
private final ResourceProperties properties = new ResourceProperties();
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void resourceChainNoCustomization() {
assertThat(this.properties.getChain().getEnabled()).isNull();
......
......@@ -469,7 +469,7 @@ content into your application. Rather, pick only the properties that you need.
spring.thymeleaf.enable-spring-el-compiler=false # Enable the SpringEL compiler in SpringEL expressions.
spring.thymeleaf.encoding=UTF-8 # Template files encoding.
spring.thymeleaf.excluded-view-names= # Comma-separated list of view names that should be excluded from resolution.
spring.thymeleaf.mode=HTML5 # Template mode to be applied to templates. See also Thymleaf's TemplateMode enum.
spring.thymeleaf.mode=HTML5 # Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum.
spring.thymeleaf.prefix=classpath:/templates/ # Prefix that gets prepended to view names when building a URL.
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.
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.
......
......@@ -183,7 +183,7 @@ register an `EndpointFilter` bean.
=== Securing HTTP Endpoints
You should take care to secure HTTP endpoints in the same way that you would any other
sensitive URL. Spring Boot will not apply any security on your behalf, however, it does
provide some convenient `RequestMatcher`s that can be used in combination with Spring
provide some convenient ``RequestMatcher``s that can be used in combination with Spring
Security.
A typical Spring Security configuration could look something like this:
......
......@@ -132,7 +132,7 @@ Maven or Gradle would but without requiring you to use a build tool.
Spring Boot extends this technique further and tries to deduce which libraries to "`grab`"
based on your code. For example, since the `WebApplication` code shown previously uses
`@RestController` annotations, Spring Boot grabs"`Tomcat`" and "`Spring MVC`".
`@RestController` annotations, Spring Boot grabs "Tomcat" and "Spring MVC".
The following items are used as "`grab hints`":
......@@ -254,7 +254,7 @@ line:
[source,java,indent=0]
----
`@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')`.
@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')
----
......
......@@ -1596,8 +1596,8 @@ configuration (for example, `logback-spring.xml` rather than `logback.xml`). If
standard configuration locations, Spring cannot completely control log initialization.
WARNING: There are known classloading issues with Java Util Logging that cause problems
when running from an '`executable jar`'. We recommend that you avoid it when running from
an '`executable jar`'if at all possible.
when running from an 'executable jar'. We recommend that you avoid it when running from
an 'executable jar' if at all possible.
To help with the customization, some other properties are transferred from the Spring
`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
use the `@JsonTest` annotation. `@JsonTest` auto-configures the available supported JSON
mapper, which can be one of the following libraries:
* Jackson `ObjectMapper`, any `@JsonComponent` beans and any Jackson `Modules`
* Jackson `ObjectMapper`, any `@JsonComponent` beans and any Jackson ``Module``s
* `Gson`
* `Jsonb`
......@@ -6215,7 +6215,7 @@ bean, which provides an alternative to the standard JPA `EntityManager` that is
specifically designed for tests. If you want to use `TestEntityManager` outside of
`@DataJpaTest` instances, you can also use the `@AutoConfigureTestEntityManager`
annotation. A `JdbcTemplate` is also available if you need that. The following example
shows the `@DataJpaTest`annotation in use:
shows the `@DataJpaTest` annotation in use:
[source,java,indent=0]
----
......
......@@ -14,7 +14,7 @@
<description>Spring Boot Parent</description>
<organization>
<name>Pivotal Software, Inc.</name>
<url>http://www.spring.io</url>
<url>https://spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
......
......@@ -90,7 +90,7 @@ public class ApplicationTemp {
String property = System.getProperty("java.io.tmpdir");
Assert.state(StringUtils.hasLength(property), "No 'java.io.tmpdir' property set");
File file = new File(property);
Assert.state(file.exists(), () -> "Temp directory" + file + " does not exist");
Assert.state(file.exists(), () -> "Temp directory " + file + " does not exist");
Assert.state(file.isDirectory(),
() -> "Temp location " + file + " is not a directory");
return file;
......
......@@ -784,7 +784,7 @@ public class SpringApplicationTests {
SpringApplication application = new SpringApplication(ExampleConfig.class,
ListenerConfig.class);
application.setApplicationContextClass(SpyApplicationContext.class);
final LinkedHashSet<ApplicationEvent> events = new LinkedHashSet<>();
Set<ApplicationEvent> events = new LinkedHashSet<>();
application.addListeners((ApplicationListener<ApplicationEvent>) events::add);
this.context = application.run();
assertThat(events).hasAtLeastOneElementOfType(ApplicationPreparedEvent.class);
......@@ -797,7 +797,7 @@ public class SpringApplicationTests {
SpringApplication application = new SpringApplication(ExampleConfig.class,
ListenerConfig.class, Multicaster.class);
application.setApplicationContextClass(SpyApplicationContext.class);
final LinkedHashSet<ApplicationEvent> events = new LinkedHashSet<>();
Set<ApplicationEvent> events = new LinkedHashSet<>();
application.addListeners((ApplicationListener<ApplicationEvent>) events::add);
this.context = application.run();
assertThat(events).hasAtLeastOneElementOfType(ApplicationPreparedEvent.class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment