Skip to content

Commit 5f167fd

Browse files
committed
Polishing
1 parent 9fdc440 commit 5f167fd

File tree

8 files changed

+31
-27
lines changed

8 files changed

+31
-27
lines changed

spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ public void setMappings(Properties mappings) {
8989
* containing object name mappings.
9090
*/
9191
public void setMappingLocation(Resource location) {
92-
this.mappingLocations = new Resource[]{location};
92+
this.mappingLocations = new Resource[] {location};
9393
}
9494

9595
/**
9696
* Set location of properties files to be loaded,
9797
* containing object name mappings.
9898
*/
99-
public void setMappingLocations(Resource[] mappingLocations) {
99+
public void setMappingLocations(Resource... mappingLocations) {
100100
this.mappingLocations = mappingLocations;
101101
}
102102

spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ public boolean didArgumentConversionOccur() {
106106
public TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException {
107107
try {
108108
if (arguments != null) {
109-
this.argumentConversionOccurred = ReflectionHelper.convertArguments(context.getTypeConverter(), arguments, this.method, this.varargsPosition);
110-
}
111-
if (this.method.isVarArgs()) {
112-
arguments = ReflectionHelper.setupArgumentsForVarargsInvocation(this.method.getParameterTypes(), arguments);
109+
this.argumentConversionOccurred = ReflectionHelper.convertArguments(
110+
context.getTypeConverter(), arguments, this.method, this.varargsPosition);
111+
if (this.method.isVarArgs()) {
112+
arguments = ReflectionHelper.setupArgumentsForVarargsInvocation(
113+
this.method.getParameterTypes(), arguments);
114+
}
113115
}
114116
ReflectionUtils.makeAccessible(this.method);
115117
Object value = this.method.invoke(target, arguments);

spring-test/src/main/java/org/springframework/test/context/transaction/TransactionContext.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,15 @@ void startTransaction() {
9696
throw new IllegalStateException(
9797
"Cannot start a new transaction without ending the existing transaction first.");
9898
}
99+
99100
this.flaggedForRollback = this.defaultRollback;
100101
this.transactionStatus = this.transactionManager.getTransaction(this.transactionDefinition);
101102
++this.transactionsStarted;
103+
102104
if (logger.isInfoEnabled()) {
103105
logger.info(String.format(
104-
"Began transaction (%s) for test context %s; transaction manager [%s]; rollback [%s]",
105-
this.transactionsStarted, this.testContext, this.transactionManager, flaggedForRollback));
106+
"Began transaction (%s) for test context %s; transaction manager [%s]; rollback [%s]",
107+
this.transactionsStarted, this.testContext, this.transactionManager, flaggedForRollback));
106108
}
107109
}
108110

spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public InterceptingAsyncClientHttpRequest(AsyncClientHttpRequestFactory requestF
6767
protected ListenableFuture<ClientHttpResponse> executeInternal(HttpHeaders headers, byte[] body)
6868
throws IOException {
6969

70-
return new AsyncRequestExecution().executeAsync(this, body);
71-
}
70+
return new AsyncRequestExecution().executeAsync(this, body);
71+
}
7272

7373
@Override
7474
public HttpMethod getMethod() {

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,63 +110,63 @@ public String getName() {
110110
}
111111

112112
/**
113-
* Returns the URL patterns of this {@link RequestMappingInfo};
114-
* or instance with 0 patterns, never {@code null}.
113+
* Return the URL patterns of this {@link RequestMappingInfo};
114+
* or instance with 0 patterns (never {@code null}).
115115
*/
116116
public PatternsRequestCondition getPatternsCondition() {
117117
return this.patternsCondition;
118118
}
119119

120120
/**
121-
* Returns the HTTP request methods of this {@link RequestMappingInfo};
122-
* or instance with 0 request methods, never {@code null}.
121+
* Return the HTTP request methods of this {@link RequestMappingInfo};
122+
* or instance with 0 request methods (never {@code null}).
123123
*/
124124
public RequestMethodsRequestCondition getMethodsCondition() {
125125
return this.methodsCondition;
126126
}
127127

128128
/**
129-
* Returns the "parameters" condition of this {@link RequestMappingInfo};
130-
* or instance with 0 parameter expressions, never {@code null}.
129+
* Return the "parameters" condition of this {@link RequestMappingInfo};
130+
* or instance with 0 parameter expressions (never {@code null}).
131131
*/
132132
public ParamsRequestCondition getParamsCondition() {
133133
return this.paramsCondition;
134134
}
135135

136136
/**
137-
* Returns the "headers" condition of this {@link RequestMappingInfo};
138-
* or instance with 0 header expressions, never {@code null}.
137+
* Return the "headers" condition of this {@link RequestMappingInfo};
138+
* or instance with 0 header expressions (never {@code null}).
139139
*/
140140
public HeadersRequestCondition getHeadersCondition() {
141141
return this.headersCondition;
142142
}
143143

144144
/**
145-
* Returns the "consumes" condition of this {@link RequestMappingInfo};
146-
* or instance with 0 consumes expressions, never {@code null}.
145+
* Return the "consumes" condition of this {@link RequestMappingInfo};
146+
* or instance with 0 consumes expressions (never {@code null}).
147147
*/
148148
public ConsumesRequestCondition getConsumesCondition() {
149149
return this.consumesCondition;
150150
}
151151

152152
/**
153-
* Returns the "produces" condition of this {@link RequestMappingInfo};
154-
* or instance with 0 produces expressions, never {@code null}.
153+
* Return the "produces" condition of this {@link RequestMappingInfo};
154+
* or instance with 0 produces expressions (never {@code null}).
155155
*/
156156
public ProducesRequestCondition getProducesCondition() {
157157
return this.producesCondition;
158158
}
159159

160160
/**
161-
* Returns the "custom" condition of this {@link RequestMappingInfo}; or {@code null}.
161+
* Return the "custom" condition of this {@link RequestMappingInfo}, or {@code null}.
162162
*/
163163
public RequestCondition<?> getCustomCondition() {
164164
return this.customConditionHolder.getCondition();
165165
}
166166

167167

168168
/**
169-
* Combines "this" request mapping info (i.e. the current instance) with another request mapping info instance.
169+
* Combine "this" request mapping info (i.e. the current instance) with another request mapping info instance.
170170
* <p>Example: combine type- and method-level request mappings.
171171
* @return a new request mapping info instance; never {@code null}
172172
*/

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/Param.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void setValue(String value) {
5656
}
5757

5858
/**
59-
* Return the raw parameter value
59+
* Return the raw parameter value.
6060
*/
6161
public String getValue() {
6262
return this.value;

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private String createUrl() throws JspException {
231231

232232
// HTML and/or JavaScript escape, if demanded.
233233
urlStr = htmlEscape(urlStr);
234-
urlStr = this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(urlStr) : urlStr;
234+
urlStr = (this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(urlStr) : urlStr);
235235

236236
return urlStr;
237237
}

spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
import org.springframework.web.socket.sockjs.SockJsService;
3535
import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler;
3636
import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler;
37+
3738
/**
3839
* An abstract base class for configuring STOMP over WebSocket/SockJS endpoints.
3940
*
4041
* @author Rossen Stoyanchev
41-
* @author Juergen Hoeller
4242
* @since 4.0
4343
*/
4444
public class WebMvcStompWebSocketEndpointRegistration implements StompWebSocketEndpointRegistration {

0 commit comments

Comments
 (0)