Skip to content

Commit 0cc644f

Browse files
committed
Polishing
1 parent 9f1d851 commit 0cc644f

File tree

9 files changed

+41
-31
lines changed

9 files changed

+41
-31
lines changed

spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public static ConversionService getSharedInstance() {
8080

8181
/**
8282
* Add converters appropriate for most environments.
83-
* @param converterRegistry the registry of converters to add to (must also be castable to ConversionService,
84-
* e.g. being a {@link ConfigurableConversionService})
83+
* @param converterRegistry the registry of converters to add to
84+
* (must also be castable to ConversionService, e.g. being a {@link ConfigurableConversionService})
8585
* @throws ClassCastException if the given ConverterRegistry could not be cast to a ConversionService
8686
*/
8787
public static void addDefaultConverters(ConverterRegistry converterRegistry) {
@@ -100,9 +100,9 @@ public static void addDefaultConverters(ConverterRegistry converterRegistry) {
100100
}
101101

102102
/**
103-
* Add collection converters.
104-
* @param converterRegistry the registry of converters to add to (must also be castable to ConversionService,
105-
* e.g. being a {@link ConfigurableConversionService})
103+
* Add common collection converters.
104+
* @param converterRegistry the registry of converters to add to
105+
* (must also be castable to ConversionService, e.g. being a {@link ConfigurableConversionService})
106106
* @throws ClassCastException if the given ConverterRegistry could not be cast to a ConversionService
107107
* @since 4.2.3
108108
*/
@@ -148,7 +148,7 @@ private static void addScalarConverters(ConverterRegistry converterRegistry) {
148148

149149
converterRegistry.addConverterFactory(new StringToEnumConverterFactory());
150150
converterRegistry.addConverter(new EnumToStringConverter((ConversionService) converterRegistry));
151-
151+
152152
converterRegistry.addConverterFactory(new IntegerToEnumConverterFactory());
153153
converterRegistry.addConverter(new EnumToIntegerConverter((ConversionService) converterRegistry));
154154

spring-oxm/src/main/java/org/springframework/oxm/config/OxmNamespaceHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
*/
2828
public class OxmNamespaceHandler extends NamespaceHandlerSupport {
2929

30-
@SuppressWarnings("deprecation")
3130
@Override
31+
@SuppressWarnings("deprecation")
3232
public void init() {
3333
registerBeanDefinitionParser("jaxb2-marshaller", new Jaxb2MarshallerBeanDefinitionParser());
3434
registerBeanDefinitionParser("jibx-marshaller", new JibxMarshallerBeanDefinitionParser());

spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,9 @@ private void applyDefaultCharset() {
187187
* Set the character set to use when writing multipart data to encode file
188188
* names. Encoding is based on the "encoded-word" syntax defined in RFC 2047
189189
* and relies on {@code MimeUtility} from "javax.mail".
190-
*
191190
* <p>As of 5.0 by default part headers, including Content-Disposition (and
192191
* its filename parameter) will be encoded based on the setting of
193192
* {@link #setCharset(Charset)} or {@code UTF-8} by default.
194-
*
195193
* @since 4.1.1
196194
* @see <a href="http://en.wikipedia.org/wiki/MIME#Encoded-Word">Encoded-Word</a>
197195
*/

spring-web/src/main/java/org/springframework/web/client/RestTemplate.java

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,29 +125,38 @@
125125
public class RestTemplate extends InterceptingHttpAccessor implements RestOperations {
126126

127127
private static boolean romePresent =
128-
ClassUtils.isPresent("com.rometools.rome.feed.WireFeed", RestTemplate.class.getClassLoader());
128+
ClassUtils.isPresent("com.rometools.rome.feed.WireFeed",
129+
RestTemplate.class.getClassLoader());
129130

130131
private static final boolean jaxb2Present =
131-
ClassUtils.isPresent("javax.xml.bind.Binder", RestTemplate.class.getClassLoader());
132+
ClassUtils.isPresent("javax.xml.bind.Binder",
133+
RestTemplate.class.getClassLoader());
132134

133135
private static final boolean jackson2Present =
134-
ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", RestTemplate.class.getClassLoader()) &&
135-
ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator", RestTemplate.class.getClassLoader());
136+
ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper",
137+
RestTemplate.class.getClassLoader()) &&
138+
ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator",
139+
RestTemplate.class.getClassLoader());
136140

137141
private static final boolean jackson2XmlPresent =
138-
ClassUtils.isPresent("com.fasterxml.jackson.dataformat.xml.XmlMapper", RestTemplate.class.getClassLoader());
142+
ClassUtils.isPresent("com.fasterxml.jackson.dataformat.xml.XmlMapper",
143+
RestTemplate.class.getClassLoader());
139144

140145
private static final boolean jackson2SmilePresent =
141-
ClassUtils.isPresent("com.fasterxml.jackson.dataformat.smile.SmileFactory", RestTemplate.class.getClassLoader());
146+
ClassUtils.isPresent("com.fasterxml.jackson.dataformat.smile.SmileFactory",
147+
RestTemplate.class.getClassLoader());
142148

143149
private static final boolean jackson2CborPresent =
144-
ClassUtils.isPresent("com.fasterxml.jackson.dataformat.cbor.CBORFactory", RestTemplate.class.getClassLoader());
150+
ClassUtils.isPresent("com.fasterxml.jackson.dataformat.cbor.CBORFactory",
151+
RestTemplate.class.getClassLoader());
145152

146153
private static final boolean gsonPresent =
147-
ClassUtils.isPresent("com.google.gson.Gson", RestTemplate.class.getClassLoader());
154+
ClassUtils.isPresent("com.google.gson.Gson",
155+
RestTemplate.class.getClassLoader());
148156

149157
private static final boolean jsonbPresent =
150-
ClassUtils.isPresent("javax.json.bind.Jsonb", RestTemplate.class.getClassLoader());
158+
ClassUtils.isPresent("javax.json.bind.Jsonb",
159+
RestTemplate.class.getClassLoader());
151160

152161

153162
private final List<HttpMessageConverter<?>> messageConverters = new ArrayList<>();

spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@
105105
* It is typically imported by adding {@link EnableWebMvc @EnableWebMvc} to an
106106
* application {@link Configuration @Configuration} class. An alternative more
107107
* advanced option is to extend directly from this class and override methods as
108-
* necessary remembering to add {@link Configuration @Configuration} to the
108+
* necessary, remembering to add {@link Configuration @Configuration} to the
109109
* subclass and {@link Bean @Bean} to overridden {@link Bean @Bean} methods.
110-
* For more details see the Javadoc of {@link EnableWebMvc @EnableWebMvc}.
110+
* For more details see the javadoc of {@link EnableWebMvc @EnableWebMvc}.
111111
*
112112
* <p>This class registers the following {@link HandlerMapping}s:</p>
113113
* <ul>
@@ -175,10 +175,12 @@
175175
public class WebMvcConfigurationSupport implements ApplicationContextAware, ServletContextAware {
176176

177177
private static boolean romePresent =
178-
ClassUtils.isPresent("com.rometools.rome.feed.WireFeed", WebMvcConfigurationSupport.class.getClassLoader());
178+
ClassUtils.isPresent("com.rometools.rome.feed.WireFeed",
179+
WebMvcConfigurationSupport.class.getClassLoader());
179180

180181
private static final boolean jaxb2Present =
181-
ClassUtils.isPresent("javax.xml.bind.Binder", WebMvcConfigurationSupport.class.getClassLoader());
182+
ClassUtils.isPresent("javax.xml.bind.Binder",
183+
WebMvcConfigurationSupport.class.getClassLoader());
182184

183185
private static final boolean jackson2Present =
184186
ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper",
@@ -199,10 +201,12 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
199201
WebMvcConfigurationSupport.class.getClassLoader());
200202

201203
private static final boolean gsonPresent =
202-
ClassUtils.isPresent("com.google.gson.Gson", WebMvcConfigurationSupport.class.getClassLoader());
204+
ClassUtils.isPresent("com.google.gson.Gson",
205+
WebMvcConfigurationSupport.class.getClassLoader());
203206

204207
private static final boolean jsonbPresent =
205-
ClassUtils.isPresent("javax.json.bind.Jsonb", WebMvcConfigurationSupport.class.getClassLoader());
208+
ClassUtils.isPresent("javax.json.bind.Jsonb",
209+
WebMvcConfigurationSupport.class.getClassLoader());
206210

207211

208212
@Nullable

src/docs/asciidoc/core/core-beans.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ The preceding example is equivalent to the following Java code:
16851685
[source,java,indent=0]
16861686
[subs="verbatim,quotes"]
16871687
----
1688-
exampleBean.setEmail("")
1688+
exampleBean.setEmail("");
16891689
----
16901690

16911691
The `<null/>` element handles `null` values. For example:
@@ -1705,7 +1705,7 @@ The above configuration is equivalent to the following Java code:
17051705
[source,java,indent=0]
17061706
[subs="verbatim,quotes"]
17071707
----
1708-
exampleBean.setEmail(null)
1708+
exampleBean.setEmail(null);
17091709
----
17101710

17111711

src/docs/asciidoc/testing.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3147,7 +3147,7 @@ framework.
31473147
c:loginAction-ref="loginAction" />
31483148
31493149
<bean id="loginAction" class="com.example.LoginAction"
3150-
c:username="\#{request.getParameter('user')}"
3150+
c:username="#{request.getParameter('user')}"
31513151
c:password="#{request.getParameter('pswd')}"
31523152
scope="request">
31533153
<aop:scoped-proxy />
@@ -3602,8 +3602,8 @@ scripts against a `DataSource`.
36023602
public void databaseTest {
36033603
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
36043604
populator.addScripts(
3605-
new ClassPathResource("test-schema.sql"),
3606-
new ClassPathResource("test-data.sql"));
3605+
new ClassPathResource("test-schema.sql"),
3606+
new ClassPathResource("test-data.sql"));
36073607
populator.setSeparator("@@");
36083608
populator.execute(this.dataSource);
36093609
// execute code that uses the test schema and data

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3818,6 +3818,7 @@ accepted as an argument in several Spring Web MVC APIs.
38183818
----
38193819

38203820

3821+
38213822
[[mvc-caching-static-resources]]
38223823
=== Static resources
38233824

@@ -3830,7 +3831,6 @@ metadata, but also `'Cache-Control'` headers if properly configured.
38303831
You can set the `cachePeriod` attribute on a `ResourceHttpRequestHandler` or use
38313832
a `CacheControl` instance, which supports more specific directives:
38323833

3833-
38343834
[source,java,indent=0]
38353835
[subs="verbatim"]
38363836
----

src/docs/asciidoc/web/websocket.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,6 @@ broadcasting to other connected clients):
995995
config.setApplicationDestinationPrefixes("/app");
996996
config.enableSimpleBroker("/topic", "/queue");
997997
}
998-
999998
}
1000999
----
10011000

0 commit comments

Comments
 (0)