Skip to content

Commit 98d6f7b

Browse files
committed
Polishing
1 parent 3506779 commit 98d6f7b

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
lines changed

spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
* @see org.quartz.impl.StdSchedulerFactory
8686
* @see org.springframework.transaction.interceptor.TransactionProxyFactoryBean
8787
*/
88-
public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBean<Scheduler>, BeanNameAware,
89-
ApplicationContextAware, InitializingBean, DisposableBean, SmartLifecycle {
88+
public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBean<Scheduler>,
89+
BeanNameAware, ApplicationContextAware, InitializingBean, DisposableBean, SmartLifecycle {
9090

9191
public static final String PROP_THREAD_COUNT = "org.quartz.threadPool.threadCount";
9292

@@ -706,7 +706,7 @@ public boolean isSingleton() {
706706

707707

708708
//---------------------------------------------------------------------
709-
// Implementation of Lifecycle interface
709+
// Implementation of SmartLifecycle interface
710710
//---------------------------------------------------------------------
711711

712712
@Override

spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public SettableListenableFuture() {
4747
this.listenableFuture = new ListenableFutureTask<T>(this.settableTask);
4848
}
4949

50+
5051
/**
5152
* Set the value of this future. This method will return {@code true} if
5253
* the value was set successfully, or {@code false} if the future has already
@@ -135,7 +136,6 @@ public T get(long timeout, TimeUnit unit) throws InterruptedException, Execution
135136
* Subclasses can override this method to implement interruption of the future's
136137
* computation. The method is invoked automatically by a successful call to
137138
* {@link #cancel(boolean) cancel(true)}.
138-
*
139139
* <p>The default implementation does nothing.
140140
*/
141141
protected void interruptTask() {

spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 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.
@@ -58,7 +58,7 @@
5858
* @see #doShutdown()
5959
*/
6060
public abstract class AbstractJmsListeningContainer extends JmsDestinationAccessor
61-
implements SmartLifecycle, BeanNameAware, DisposableBean {
61+
implements BeanNameAware, DisposableBean, SmartLifecycle {
6262

6363
private String clientId;
6464

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 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.
@@ -37,7 +37,7 @@
3737
*
3838
* @author Arjen Poutsma
3939
* @since 3.0
40-
* @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest(java.net.URI, org.springframework.http.HttpMethod)
40+
* @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest
4141
*/
4242
final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHttpRequest {
4343

@@ -47,13 +47,16 @@ final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsync
4747

4848
private final AsyncListenableTaskExecutor taskExecutor;
4949

50+
5051
SimpleBufferingAsyncClientHttpRequest(HttpURLConnection connection,
5152
boolean outputStreaming, AsyncListenableTaskExecutor taskExecutor) {
53+
5254
this.connection = connection;
5355
this.outputStreaming = outputStreaming;
5456
this.taskExecutor = taskExecutor;
5557
}
5658

59+
5760
@Override
5861
public HttpMethod getMethod() {
5962
return HttpMethod.valueOf(this.connection.getRequestMethod());
@@ -72,7 +75,8 @@ public URI getURI() {
7275
@Override
7376
protected ListenableFuture<ClientHttpResponse> executeInternal(
7477
final HttpHeaders headers, final byte[] bufferedOutput) throws IOException {
75-
return taskExecutor.submitListenable(new Callable<ClientHttpResponse>() {
78+
79+
return this.taskExecutor.submitListenable(new Callable<ClientHttpResponse>() {
7680
@Override
7781
public ClientHttpResponse call() throws Exception {
7882
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
@@ -81,11 +85,9 @@ public ClientHttpResponse call() throws Exception {
8185
connection.addRequestProperty(headerName, headerValue);
8286
}
8387
}
84-
8588
if (connection.getDoOutput() && outputStreaming) {
8689
connection.setFixedLengthStreamingMode(bufferedOutput.length);
8790
}
88-
8991
connection.connect();
9092
if (connection.getDoOutput()) {
9193
FileCopyUtils.copy(bufferedOutput, connection.getOutputStream());

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 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.
@@ -33,13 +33,12 @@
3333

3434
/**
3535
* {@link org.springframework.http.client.ClientHttpRequest} implementation that uses
36-
* standard J2SE facilities to execute streaming requests. Created via the {@link
36+
* standard Java facilities to execute streaming requests. Created via the {@link
3737
* org.springframework.http.client.SimpleClientHttpRequestFactory}.
3838
*
3939
* @author Arjen Poutsma
40-
* @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest(java.net.URI,
41-
* org.springframework.http.HttpMethod)
4240
* @since 3.0
41+
* @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest
4342
*/
4443
final class SimpleStreamingAsyncClientHttpRequest extends AbstractAsyncClientHttpRequest {
4544

@@ -53,14 +52,17 @@ final class SimpleStreamingAsyncClientHttpRequest extends AbstractAsyncClientHtt
5352

5453
private final AsyncListenableTaskExecutor taskExecutor;
5554

55+
5656
SimpleStreamingAsyncClientHttpRequest(HttpURLConnection connection, int chunkSize,
5757
boolean outputStreaming, AsyncListenableTaskExecutor taskExecutor) {
58+
5859
this.connection = connection;
5960
this.chunkSize = chunkSize;
6061
this.outputStreaming = outputStreaming;
6162
this.taskExecutor = taskExecutor;
6263
}
6364

65+
6466
@Override
6567
public HttpMethod getMethod() {
6668
return HttpMethod.valueOf(this.connection.getRequestMethod());
@@ -106,8 +108,7 @@ private void writeHeaders(HttpHeaders headers) {
106108
}
107109

108110
@Override
109-
protected ListenableFuture<ClientHttpResponse> executeInternal(final HttpHeaders headers)
110-
throws IOException {
111+
protected ListenableFuture<ClientHttpResponse> executeInternal(final HttpHeaders headers) throws IOException {
111112
return taskExecutor.submitListenable(new Callable<ClientHttpResponse>() {
112113
@Override
113114
public ClientHttpResponse call() throws Exception {

spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,11 @@
266266
@Mapping
267267
public @interface RequestMapping {
268268

269-
270269
/**
271270
* Assign a name to this mapping.
272-
* <p><b>Supported at the method and also at type level!</b>
273-
* When used on both levels, a combined name is derived by
274-
* concatenation with "#" as separator.
275-
*
271+
* <p><b>Supported at the type level as well as at the method level!</b>
272+
* When used on both levels, a combined name is derived by concatenation
273+
* with "#" as separator.
276274
* @see org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder
277275
* @see org.springframework.web.servlet.handler.HandlerMethodMappingNamingStrategy
278276
*/

spring-websocket/src/main/java/org/springframework/web/socket/client/standard/StandardWebSocketClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,16 @@ protected ListenableFuture<WebSocketSession> doHandshakeInternal(WebSocketHandle
116116
final StandardWebSocketSession session = new StandardWebSocketSession(headers,
117117
attributes, localAddress, remoteAddress);
118118

119-
final ClientEndpointConfig.Builder configBuidler = ClientEndpointConfig.Builder.create();
120-
configBuidler.configurator(new StandardWebSocketClientConfigurator(headers));
121-
configBuidler.preferredSubprotocols(protocols);
122-
configBuidler.extensions(adaptExtensions(extensions));
119+
final ClientEndpointConfig.Builder configBuilder = ClientEndpointConfig.Builder.create();
120+
configBuilder.configurator(new StandardWebSocketClientConfigurator(headers));
121+
configBuilder.preferredSubprotocols(protocols);
122+
configBuilder.extensions(adaptExtensions(extensions));
123123
final Endpoint endpoint = new StandardWebSocketHandlerAdapter(webSocketHandler, session);
124124

125125
Callable<WebSocketSession> connectTask = new Callable<WebSocketSession>() {
126126
@Override
127127
public WebSocketSession call() throws Exception {
128-
webSocketContainer.connectToServer(endpoint, configBuidler.build(), uri);
128+
webSocketContainer.connectToServer(endpoint, configBuilder.build(), uri);
129129
return session;
130130
}
131131
};
@@ -142,8 +142,8 @@ public WebSocketSession call() throws Exception {
142142

143143
private static List<Extension> adaptExtensions(List<WebSocketExtension> extensions) {
144144
List<Extension> result = new ArrayList<Extension>();
145-
for (WebSocketExtension e : extensions) {
146-
result.add(new WebSocketToStandardExtensionAdapter(e));
145+
for (WebSocketExtension extension : extensions) {
146+
result.add(new WebSocketToStandardExtensionAdapter(extension));
147147
}
148148
return result;
149149
}

0 commit comments

Comments
 (0)