Skip to content

Commit 9cb4de8

Browse files
committed
Polishing
1 parent 8662c61 commit 9cb4de8

File tree

5 files changed

+23
-25
lines changed

5 files changed

+23
-25
lines changed

spring-core/src/main/java/org/springframework/core/env/AbstractPropertyResolver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,16 @@ protected <T> T convertValueIfNecessary(Object value, Class<T> targetType) {
254254
if (targetType == null) {
255255
return (T) value;
256256
}
257-
ConversionService csToUse = this.conversionService;
258-
if (csToUse == null) {
257+
ConversionService conversionServiceToUse = this.conversionService;
258+
if (conversionServiceToUse == null) {
259259
// Avoid initialization of shared DefaultConversionService if
260260
// no standard type conversion is needed in the first place...
261261
if (ClassUtils.isAssignableValue(targetType, value)) {
262262
return (T) value;
263263
}
264-
csToUse = DefaultConversionService.getSharedInstance();
264+
conversionServiceToUse = DefaultConversionService.getSharedInstance();
265265
}
266-
return csToUse.convert(value, targetType);
266+
return conversionServiceToUse.convert(value, targetType);
267267
}
268268

269269

spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public SQLErrorCodes registerDatabase(DataSource dataSource, String databaseName
251251
/**
252252
* Clear the cache for the specified {@link DataSource}, if registered.
253253
* @param dataSource the {@code DataSource} identifying the database
254-
* @return the corresponding {@code SQLErrorCodes} object,
254+
* @return the corresponding {@code SQLErrorCodes} object that got removed,
255255
* or {@code null} if not registered
256256
* @since 4.3.5
257257
* @see #registerDatabase(DataSource, String)

spring-oxm/src/main/java/org/springframework/oxm/xstream/CatchAllConverter.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,27 +23,27 @@
2323
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
2424

2525
/**
26-
* XStream {@link Converter} that supports all classes but throws exceptions
27-
* for (un)marshalling.
26+
* XStream {@link Converter} that supports all classes, but throws exceptions for
27+
* (un)marshalling.
2828
*
29-
* <p>Main purpose of this class is to
30-
* {@linkplain com.thoughtworks.xstream.XStream#registerConverter(Converter, int) register}
31-
* this converter as a catch-all converter with a
29+
* <p>The main purpose of this class is to
30+
* {@linkplain com.thoughtworks.xstream.XStream#registerConverter(com.thoughtworks.xstream.converters.Converter, int) register}
31+
* this converter as a catch-all last converter with a
3232
* {@linkplain com.thoughtworks.xstream.XStream#PRIORITY_NORMAL normal}
33-
* or higher priority, in addition to converters that explicitly support the domain
34-
* classes that should be supported. As a result, default XStream converters with lower
35-
* priorities and possible security vulnerabilities do not get invoked.
33+
* or higher priority, in addition to converters that explicitly handle the domain
34+
* classes that should be supported. As a result, default XStream converters with
35+
* lower priorities and possible security vulnerabilities do not get invoked.
3636
*
37-
* <p>For instance:</p>
37+
* <p>For instance:
3838
* <pre class="code">
3939
* XStreamMarshaller unmarshaller = new XStreamMarshaller();
4040
* unmarshaller.getXStream().registerConverter(new MyDomainClassConverter(), XStream.PRIORITY_VERY_HIGH);
4141
* unmarshaller.getXStream().registerConverter(new CatchAllConverter(), XStream.PRIORITY_NORMAL);
42-
* MyDomainClass o = unmarshaller.unmarshal(source);
42+
* MyDomainClass myObject = unmarshaller.unmarshal(source);
4343
* </pre
4444
*
4545
* @author Arjen Poutsma
46-
* @since 4.0
46+
* @since 3.2.5
4747
*/
4848
public class CatchAllConverter implements Converter {
4949

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
310310

311311
/**
312312
* Update a resource by PATCHing the given object to the URI template,
313-
* and returns the representation found in the response.
313+
* and return the representation found in the response.
314314
* <p>URI Template variables are expanded using the given URI variables, if any.
315315
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
316316
* add additional HTTP headers to the request.
317317
* @param url the URL
318-
* @param request the Object to be PATCHed (may be {@code null})
318+
* @param request the object to be PATCHed (may be {@code null})
319319
* @param responseType the type of the return value
320320
* @param uriVariables the variables to expand the template
321321
* @return the converted object
@@ -327,12 +327,12 @@ <T> T patchForObject(String url, Object request, Class<T> responseType, Object..
327327

328328
/**
329329
* Update a resource by PATCHing the given object to the URI template,
330-
* and returns the representation found in the response.
330+
* and return the representation found in the response.
331331
* <p>URI Template variables are expanded using the given map.
332332
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
333333
* add additional HTTP headers to the request.
334334
* @param url the URL
335-
* @param request the Object to be PATCHed (may be {@code null})
335+
* @param request the object to be PATCHed (may be {@code null})
336336
* @param responseType the type of the return value
337337
* @param uriVariables the variables to expand the template
338338
* @return the converted object
@@ -344,11 +344,11 @@ <T> T patchForObject(String url, Object request, Class<T> responseType, Map<Stri
344344

345345
/**
346346
* Update a resource by PATCHing the given object to the URL,
347-
* and returns the representation found in the response.
347+
* and return the representation found in the response.
348348
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
349349
* add additional HTTP headers to the request.
350350
* @param url the URL
351-
* @param request the Object to be PATCHed (may be {@code null})
351+
* @param request the object to be PATCHed (may be {@code null})
352352
* @param responseType the type of the return value
353353
* @return the converted object
354354
* @since 4.3.5

spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ public org.springframework.messaging.simp.user.UserSessionRegistry getUserSessio
175175

176176
/**
177177
* Configure a {@link StompEncoder} for encoding STOMP frames
178-
* @param encoder the encoder
179178
* @since 4.3.5
180179
*/
181180
public void setEncoder(StompEncoder encoder) {
@@ -184,7 +183,6 @@ public void setEncoder(StompEncoder encoder) {
184183

185184
/**
186185
* Configure a {@link StompDecoder} for decoding STOMP frames
187-
* @param decoder the decoder
188186
* @since 4.3.5
189187
*/
190188
public void setDecoder(StompDecoder decoder) {

0 commit comments

Comments
 (0)