Skip to content

Commit 29ebb75

Browse files
committed
Merge pull request #11630 from izeye:polish-20180114
* pr/11630: Polish
2 parents 3f88906 + 77150f8 commit 29ebb75

File tree

17 files changed

+34
-38
lines changed

17 files changed

+34
-38
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/gson/GsonProperties.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ public class GsonProperties {
4444
private Boolean excludeFieldsWithoutExposeAnnotation;
4545

4646
/**
47-
* Whether to to serialize null fields.
47+
* Whether to serialize null fields.
4848
*/
4949
private Boolean serializeNulls;
5050

5151
/**
52-
* Whether to enabled serialization of complex map keys (i.e. non-primitives).
52+
* Whether to enable serialization of complex map keys (i.e. non-primitives).
5353
*/
5454
private Boolean enableComplexMapKeySerialization;
5555

@@ -64,7 +64,7 @@ public class GsonProperties {
6464
private LongSerializationPolicy longSerializationPolicy;
6565

6666
/**
67-
* The naming policy that should be applied to an object's field during serialization
67+
* Naming policy that should be applied to an object's field during serialization
6868
* and deserialization.
6969
*/
7070
private FieldNamingPolicy fieldNamingPolicy;
@@ -80,12 +80,12 @@ public class GsonProperties {
8080
private Boolean lenient;
8181

8282
/**
83-
* Whether to disable the escaping of HTML characters such as '<' '>' etc.
83+
* Whether to disable the escaping of HTML characters such as '<', '>', etc.
8484
*/
8585
private Boolean disableHtmlEscaping;
8686

8787
/**
88-
* The format to use when serializing Date objects.
88+
* Format to use when serializing Date objects.
8989
*/
9090
private String dateFormat;
9191

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/gson/GsonAutoConfigurationTests.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void withoutLenient() {
181181
this.contextRunner.run(context -> {
182182
Gson gson = context.getBean(Gson.class);
183183
/*
184-
* It seems, that lenient setting not work in version 2.8.2 We get access to
184+
* It seems that lenient setting not work in version 2.8.2. We get access to
185185
* it via reflection
186186
*/
187187
Field lenientField = gson.getClass().getDeclaredField("lenient");
@@ -196,10 +196,9 @@ public void withoutLenient() {
196196
public void withLenient() {
197197
this.contextRunner.withPropertyValues("spring.gson.lenient:true").run(context -> {
198198
Gson gson = context.getBean(Gson.class);
199-
200199
/*
201-
* It seems, that lenient setting not work in version 2.8.0 of gson We get
202-
* access to it via reflection
200+
* It seems that lenient setting not work in version 2.8.2. We get access to
201+
* it via reflection
203202
*/
204203
Field lenientField = gson.getClass().getDeclaredField("lenient");
205204
lenientField.setAccessible(true);
@@ -271,8 +270,6 @@ public GsonBuilder customGsonBuilder() {
271270

272271
public class DataObject {
273272

274-
public static final String STATIC_DATA = "bye";
275-
276273
@SuppressWarnings("unused")
277274
private Long data = 1L;
278275

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ public void responseCommitted() throws Exception {
227227
.build();
228228
this.thrown.expectCause(instanceOf(IllegalStateException.class));
229229
this.thrown.expectMessage("already committed!");
230-
client.get().uri("/commit").exchange().expectStatus().isEqualTo(HttpStatus.OK)
231-
.expectBody().isEmpty();
230+
client.get().uri("/commit").exchange().expectStatus();
232231
});
233232
}
234233

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,17 @@ content into your application. Rather, pick only the properties that you need.
340340
spring.jackson.time-zone= # Time zone used when formatting dates. For instance, "America/Los_Angeles" or "GMT+10".
341341
342342
# GSON ({sc-spring-boot-autoconfigure}/gson/GsonProperties.{sc-ext}[GsonProperties])
343-
spring.gson.date-format= # The format to use when serializing Date objects.
344-
spring.gson.disable-html-escaping= # Whether to disable the escaping of HTML characters such as '<' '>' etc.
343+
spring.gson.date-format= # Format to use when serializing Date objects.
344+
spring.gson.disable-html-escaping= # Whether to disable the escaping of HTML characters such as '<', '>', etc.
345345
spring.gson.disable-inner-class-serialization= # Whether to exclude inner classes during serialization.
346-
spring.gson.enable-complex-map-key-serialization= # Whether to enabled serialization of complex map keys (i.e. non-primitives).
346+
spring.gson.enable-complex-map-key-serialization= # Whether to enable serialization of complex map keys (i.e. non-primitives).
347347
spring.gson.exclude-fields-without-expose-annotation= # Whether to exclude all fields from consideration for serialization or deserialization that do not have the "Expose" annotation.
348-
spring.gson.field-naming-policy= # The naming policy that should be applied to an object's field during serialization and deserialization.
348+
spring.gson.field-naming-policy= # Naming policy that should be applied to an object's field during serialization and deserialization.
349349
spring.gson.generate-non-executable-json= # Whether to generate non executable JSON by prefixing the output with some special text.
350350
spring.gson.lenient= # Whether to be lenient about parsing JSON that doesn't conform to RFC 4627.
351351
spring.gson.long-serialization-policy= # Serialization policy for Long and long types.
352352
spring.gson.pretty-printing= # Whether to output serialized JSON that fits in a page for pretty printing.
353-
spring.gson.serialize-nulls= # Whether to to serialize null fields.
353+
spring.gson.serialize-nulls= # Whether to serialize null fields.
354354
355355
# JERSEY ({sc-spring-boot-autoconfigure}/jersey/JerseyProperties.{sc-ext}[JerseyProperties])
356356
spring.jersey.application-path= # Path that serves as the base URI for the application. If specified, overrides the value of "@ApplicationPath".

spring-boot-project/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ build system. If you are just getting started, you might want to read
1515

1616
[[build-tool-plugins-maven-plugin]]
1717
== Spring Boot Maven Plugin
18-
The {spring-boot-maven-plugin-site}/[Spring Boot Maven Plugin] provides Spring Boot
18+
The {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin] provides Spring Boot
1919
support in Maven, letting you package executable jar or war archives and run an
2020
application "`in-place`". To use it, you must use Maven 3.2 (or later).
2121

22-
NOTE: See the {spring-boot-maven-plugin-site}/[Spring Boot Maven Plugin Site] for complete
22+
NOTE: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin Site] for complete
2323
plugin documentation.
2424

2525

@@ -160,7 +160,7 @@ TIP: See the "`<<howto-create-a-deployable-war-file>>`" section for more details
160160
create a deployable war file.
161161

162162
Advanced configuration options and examples are available in the
163-
{spring-boot-maven-plugin-site}/[plugin info page].
163+
{spring-boot-maven-plugin-site}[plugin info page].
164164

165165

166166

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ In addition, all properties in `+spring.jpa.properties.*+` are passed through as
17901790
JPA properties (with the prefix stripped) when the local `EntityManagerFactory` is
17911791
created.
17921792

1793-
TIP: if you need to apply advanced customization to Hibernate properties, consider
1793+
TIP: If you need to apply advanced customization to Hibernate properties, consider
17941794
registering a `HibernatePropertiesCustomizer` bean that will be invoked prior to creating
17951795
the `EntityManagerFactory`. This takes precedence to anything that is applied by the
17961796
auto-configuration.
@@ -2486,7 +2486,7 @@ shown in the following example:
24862486
</build>
24872487
----
24882488

2489-
TIP: See the {spring-boot-maven-plugin-site}/[Spring Boot Maven Plugin documentation]
2489+
TIP: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin documentation]
24902490
for more details.
24912491

24922492
The following example does the same with Gradle:
@@ -2742,7 +2742,7 @@ for the library, as follows:
27422742
[[howto-remote-debug-maven-run]]
27432743
=== Remote Debug a Spring Boot Application Started with Maven
27442744
To attach a remote debugger to a Spring Boot application that was started with Maven, you
2745-
can use the `jvmArguments` property of the {spring-boot-maven-plugin-site}/[maven plugin].
2745+
can use the `jvmArguments` property of the {spring-boot-maven-plugin-site}[maven plugin].
27462746

27472747
See {spring-boot-maven-plugin-site}/examples/run-debug.html[this example] for more
27482748
details.

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
3636
:dependency-management-plugin: https://github.com/spring-gradle-plugins/dependency-management-plugin
3737
:dependency-management-plugin-documentation: {dependency-management-plugin}/blob/master/README.md
3838
:spring-boot-actuator-api: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/actuator-api/
39-
:spring-boot-maven-plugin-site: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/maven-plugin/
40-
:spring-boot-gradle-plugin: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/gradle-plugin/
39+
:spring-boot-maven-plugin-site: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/maven-plugin
40+
:spring-boot-gradle-plugin: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/gradle-plugin
4141
:spring-reference: http://docs.spring.io/spring/docs/{spring-docs-version}/spring-framework-reference/
4242
:spring-rest-docs: http://projects.spring.io/spring-restdocs/
4343
:spring-integration: http://projects.spring.io/spring-integration/

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ in your `ApplicationContext`. Spring Boot includes a number of auto-configured
562562
[[production-ready-application-info-autoconfigure]]
563563
==== Auto-configured InfoContributors
564564

565-
The following `InfoContributor ` beans are auto-configured by Spring Boot, when
565+
The following `InfoContributor` beans are auto-configured by Spring Boot, when
566566
appropriate:
567567

568568
[cols="1,4"]

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ _<<getting-started.adoc#getting-started-first-application, Getting started>>_ se
17821782
=== The "`Spring Web MVC Framework`"
17831783
The {spring-reference}web.html#mvc[Spring Web MVC framework] (often referred to as simply
17841784
"`Spring MVC`") is a rich "`model view controller`" web framework. Spring MVC lets you
1785-
create special `@Controller`or `@RestController` beans to handle incoming HTTP requests.
1785+
create special `@Controller` or `@RestController` beans to handle incoming HTTP requests.
17861786
Methods in your controller are mapped to HTTP by using `@RequestMapping` annotations.
17871787

17881788
The following code shows a typical `@RestController` that serves JSON data:

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONArray.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.Iterator;
2323
import java.util.List;
2424

25-
// Note: this class was written without inspecting the non-free org.json sourcecode.
25+
// Note: this class was written without inspecting the non-free org.json source code.
2626

2727
/**
2828
* A dense indexed sequence of values. Values may be any mix of {@link JSONObject

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.configurationprocessor.json;
1818

19-
// Note: this class was written without inspecting the non-free org.json sourcecode.
19+
// Note: this class was written without inspecting the non-free org.json source code.
2020

2121
/**
2222
* Thrown to indicate a problem with the JSON API. Such problems include:

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.Iterator;
2323
import java.util.Map;
2424

25-
// Note: this class was written without inspecting the non-free org.json sourcecode.
25+
// Note: this class was written without inspecting the non-free org.json source code.
2626

2727
/**
2828
* A modifiable set of name/value mappings. Names are unique, non-null strings. Values may

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONStringer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.Arrays;
2121
import java.util.List;
2222

23-
// Note: this class was written without inspecting the non-free org.json sourcecode.
23+
// Note: this class was written without inspecting the non-free org.json source code.
2424

2525
/**
2626
* Implements {@link JSONObject#toString} and {@link JSONArray#toString}. Most application

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.configurationprocessor.json;
1818

19-
// Note: this class was written without inspecting the non-free org.json sourcecode.
19+
// Note: this class was written without inspecting the non-free org.json source code.
2020

2121
/**
2222
* Parses a JSON (<a href="http://www.ietf.org/rfc/rfc4627.txt">RFC 4627</a>) encoded

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void setName(String name) {
5858
}
5959

6060
/**
61-
* Sets if asynchronous operations are support for this registration. If not specified
61+
* Sets if asynchronous operations are supported for this registration. If not specified
6262
* defaults to {@code true}.
6363
* @param asyncSupported if async is supported
6464
*/
@@ -67,7 +67,7 @@ public void setAsyncSupported(boolean asyncSupported) {
6767
}
6868

6969
/**
70-
* Returns if asynchronous operations are support for this registration.
70+
* Returns if asynchronous operations are supported for this registration.
7171
* @return if async is supported
7272
*/
7373
public boolean isAsyncSupported() {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletContextInitializerBeans.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ public int size() {
246246
}
247247

248248
/**
249-
* Adapter to convert a given Bean type into a {@link DynamicRegistrationBean} (and
250-
* hence a {@link ServletContextInitializer}.
249+
* Adapter to convert a given Bean type into a {@link RegistrationBean} (and
250+
* hence a {@link ServletContextInitializer}).
251251
*/
252252
private interface RegistrationBeanAdapter<T> {
253253

spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void userDefinedMappingsSecure() {
5555
}
5656

5757
@Test
58-
public void healthAndInfoDontRequireAuthentication() {
58+
public void healthAndInfoDoNotRequireAuthentication() {
5959
this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON)
6060
.exchange().expectStatus().isOk();
6161
this.webClient.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON)

0 commit comments

Comments
 (0)