Skip to content

Commit 871d65d

Browse files
committed
Merge pull request #10921 from izeye:polish-20171104
* pr/10921: Polish
2 parents c9e18e2 + c05a299 commit 871d65d

File tree

14 files changed

+21
-29
lines changed

14 files changed

+21
-29
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
import okhttp3.mockwebserver.RecordedRequest;
2424
import org.junit.After;
2525
import org.junit.Before;
26-
import org.junit.Rule;
2726
import org.junit.Test;
28-
import org.junit.rules.ExpectedException;
2927
import reactor.test.StepVerifier;
3028

3129
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel;
@@ -43,9 +41,6 @@
4341
*/
4442
public class ReactiveCloudFoundrySecurityServiceTests {
4543

46-
@Rule
47-
public ExpectedException thrown = ExpectedException.none();
48-
4944
private static final String CLOUD_CONTROLLER = "/my-cloud-controller.com";
5045

5146
private static final String CLOUD_CONTROLLER_PERMISSIONS = CLOUD_CONTROLLER

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

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

3131
import org.apache.commons.codec.binary.Base64;
3232
import org.junit.Before;
33-
import org.junit.Rule;
3433
import org.junit.Test;
35-
import org.junit.rules.ExpectedException;
3634
import org.mockito.Mock;
3735
import org.mockito.MockitoAnnotations;
3836
import reactor.core.publisher.Mono;
@@ -58,9 +56,6 @@ public class ReactiveTokenValidatorTests {
5856

5957
private static final Charset UTF_8 = Charset.forName("UTF-8");
6058

61-
@Rule
62-
public ExpectedException thrown = ExpectedException.none();
63-
6459
@Mock
6560
private ReactiveCloudFoundrySecurityService securityService;
6661

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/GsonHttpMessageConvertersConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private static class JacksonAndJsonbUnavailable extends NoneNestedConditions {
8282
}
8383

8484
@ConditionalOnBean(MappingJackson2HttpMessageConverter.class)
85-
static class JacksonMissing {
85+
static class JacksonAvailable {
8686

8787
}
8888

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfigurationTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ public void gsonIsPreferredIfJacksonIsNotAvailable() {
241241
.run((context) -> {
242242
assertConverterBeanExists(context, GsonHttpMessageConverter.class,
243243
"gsonHttpMessageConverter");
244+
assertConverterBeanRegisteredWithHttpMessageConverters(context,
245+
GsonHttpMessageConverter.class);
244246
assertThat(context).doesNotHaveBean(JsonbHttpMessageConverter.class);
245247
});
246248
}

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ Consider the following class:
822822
}
823823
----
824824

825-
The preceding example produces metdata information for `server.name`, `server.host.ip`,
825+
The preceding example produces metadata information for `server.name`, `server.host.ip`,
826826
and `server.host.port` properties. You can use the `@NestedConfigurationProperty`
827827
annotation on a field to indicate that a regular (non-inner) class should be treated as
828828
if it were nested.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The buildpack wraps your deployed code in whatever is needed to _start_ your app
2525
it might be a JDK and a call to `java`, it might be an embedded web server, or it might be
2626
a full-fledged application server. A buildpack is pluggable, but ideally you should be
2727
able to get by with as few customizations to it as possible. This reduces the footprint of
28-
unctionality that is not under your control. It minimizes divergence between development
28+
functionality that is not under your control. It minimizes divergence between development
2929
and production environments.
3030

3131
Ideally, your application, like a Spring Boot executable jar, has everything that it needs

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ the `<build/>` element of your `pom.xml`:
206206
</resources>
207207
----
208208

209-
You also need to incude the following element inside `<plugins/>`:
209+
You also need to include the following element inside `<plugins/>`:
210210

211211
[source,xml,indent=0]
212212
----
@@ -710,7 +710,7 @@ processed early (before the value is actually available).
710710
=== Configure SSL
711711
SSL can be configured declaratively by setting the various `+server.ssl.*+` properties,
712712
typically in `application.properties` or `application.yml`. The following example shows
713-
setting SSL properties in `applicaiton.properties`:
713+
setting SSL properties in `application.properties`:
714714

715715
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
716716
----
@@ -1591,7 +1591,7 @@ To run an app with that `DataSource`, all you need is the connection
15911591
information. Pool-specific settings can also be provided. Check the implementation that
15921592
is going to be used at runtime for more details.
15931593

1594-
The following example shows how to deine a JDBC data source by setting properties:
1594+
The following example shows how to define a JDBC data source by setting properties:
15951595

15961596
[source,properties,indent=0]
15971597
----
@@ -1947,7 +1947,7 @@ If you are configuring a component yourself, you can use an
19471947
`EntityManagerFactoryDependsOnPostProcessor` subclass as a convenient way of setting up
19481948
the necessary dependencies. For example, if you use Hibernate Search with
19491949
Elasticsearch as its index manager, any `EntityManagerFactory` beans must be
1950-
configured to depend on the `elasticsearchClient` bean, as shown in the follwing example:
1950+
configured to depend on the `elasticsearchClient` bean, as shown in the following example:
19511951

19521952
[source,java,indent=0]
19531953
----

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
@@ -938,7 +938,7 @@ information:
938938

939939
- The request's method
940940
- The request's URI (templated if possible).
941-
- The esponse's status.
941+
- The response's status.
942942

943943
To customize the tags, use the `defaultTags` method on your `RouterFunctionMetrics`
944944
instance.

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ used instead of the `ErrorAttributes` representation.
21372137

21382138

21392139
[[boot-features-error-handling-custom-error-pages]]
2140-
===== Custom Error Eages
2140+
===== Custom Error Pages
21412141
If you want to display a custom HTML error page for a given status code, you can add a
21422142
file to an `/error` folder. Error pages can either be static HTML (that is, added under
21432143
any of the static resource folders) or built by using templates. The name of the file
@@ -2777,7 +2777,7 @@ register a Spring bean that implements the `WebServerFactoryCustomizer` interfac
27772777
`WebServerFactoryCustomizer` provides access to the
27782778
`ConfigurableServletWebServerFactory`, which includes numerous customization setter
27792779
methods. Dedicated variants exist for Tomcat, Jetty, and Undertow. The following example
2780-
shows programatically setting the port:
2780+
shows programmatically setting the port:
27812781

27822782
[source,java,indent=0]
27832783
----
@@ -3070,7 +3070,7 @@ Production database connections can also be auto-configured by using a pooling
30703070
`DataSource`. Spring Boot uses the following algorithm for choosing a specific
30713071
implementation:
30723072

3073-
. We prefer HikariCP for its performance and concurrency. If HkiariCP is available, we
3073+
. We prefer HikariCP for its performance and concurrency. If HikariCP is available, we
30743074
always choose it.
30753075
. Otherwise, if the Tomcat pooling `DataSource` is available, we use it.
30763076
. If neither HikariCP nor the Tomcat pooling datasource are available and if Commons
@@ -6173,7 +6173,7 @@ Spring Data JPA repositories. Regular `@Component` beans are not loaded into the
61736173

61746174
By default, data JPA tests are transactional and roll back at the end of each test. See
61756175
the {spring-reference}testing.html#testcontext-tx-enabling-transactions[relevant section]
6176-
in the Spring Framwork Reference Documentation for more details. If that is not what you
6176+
in the Spring Framework Reference Documentation for more details. If that is not what you
61776177
want, you can disable transaction management for a test or for the whole class as
61786178
follows:
61796179

@@ -6438,7 +6438,7 @@ A list of the auto-configuration settings that are enabled by `@DataNeo4jTest` c
64386438
==== Auto-configured Data Redis Tests
64396439
You can use `@DataRedisTest` to test Redis applications. By default, it scans for
64406440
`@RedisHash` classes and configures Spring Data Redis repositories. Regular `@Component`
6441-
beans are not loaded into the `ApplicationContext`. The follwing example shows the
6441+
beans are not loaded into the `ApplicationContext`. The following example shows the
64426442
`@DataRedisTest` annotation in use:
64436443

64446444
[source,java,indent=0]
@@ -6510,7 +6510,7 @@ following example:
65106510
}
65116511
----
65126512

6513-
A list of the auto-configuration settiongs that are enabled by `@DataLdapTest` can be
6513+
A list of the auto-configuration settings that are enabled by `@DataLdapTest` can be
65146514
<<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>.
65156515

65166516

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/AutoConfigureJsonTesters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
/**
4949
* If {@link BasicJsonTester}, {@link JacksonTester}, {@link JsonbTester} and
50-
* {@link GsonTester} beans should be registered. Defaults to {@code true}
50+
* {@link GsonTester} beans should be registered. Defaults to {@code true}.
5151
* @return if tester support is enabled
5252
*/
5353
boolean enabled() default true;

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* existing bean is defined a new one will be added. Dependencies that are known to the
4242
* application context but are not beans (such as those
4343
* {@link org.springframework.beans.factory.config.ConfigurableListableBeanFactory#registerResolvableDependency(Class, Object)
44-
* registered directly} ) will not be found and a mocked bean will be added to the context
44+
* registered directly}) will not be found and a mocked bean will be added to the context
4545
* alongside the existing dependency.
4646
* <p>
4747
* When {@code @MockBean} is used on a field, as well as being registered in the

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* will be added. Dependencies that are known to the application context but are not beans
4242
* (such as those
4343
* {@link org.springframework.beans.factory.config.ConfigurableListableBeanFactory#registerResolvableDependency(Class, Object)
44-
* registered directly} ) will not be found and a spied bean will be added to the context
44+
* registered directly}) will not be found and a spied bean will be added to the context
4545
* alongside the existing dependency.
4646
* <p>
4747
* When {@code @SpyBean} is used on a field, as well as being registered in the

spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithNameOnTestFieldForMultipleExistingBeansTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class SpyBeanWithNameOnTestFieldForMultipleExistingBeansTests {
4444
@Test
4545
public void testSpying() throws Exception {
4646
MockingDetails mockingDetails = Mockito.mockingDetails(this.spy);
47-
assertThat(mockingDetails.isMock()).isTrue();
47+
assertThat(mockingDetails.isSpy()).isTrue();
4848
assertThat(mockingDetails.getMockCreationSettings().getMockName().toString())
4949
.isEqualTo("two");
5050
}

spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/DefaultLaunchScript.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private String expandPlaceholders(String content, Map<?, ?> properties)
104104
if (properties != null && properties.containsKey(name)) {
105105
Object propertyValue = properties.get(name);
106106
if (FILE_PATH_KEYS.contains(name)) {
107-
value = parseFilePropertyValue(properties.get(name));
107+
value = parseFilePropertyValue(propertyValue);
108108
}
109109
else {
110110
value = propertyValue.toString();

0 commit comments

Comments
 (0)