diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java index 3319ce5436..69282efcbf 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java @@ -85,8 +85,8 @@ import org.springframework.util.CollectionUtils; * @see org.quartz.impl.StdSchedulerFactory * @see org.springframework.transaction.interceptor.TransactionProxyFactoryBean */ -public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBean, BeanNameAware, - ApplicationContextAware, InitializingBean, DisposableBean, SmartLifecycle { +public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBean, + BeanNameAware, ApplicationContextAware, InitializingBean, DisposableBean, SmartLifecycle { public static final String PROP_THREAD_COUNT = "org.quartz.threadPool.threadCount"; @@ -706,7 +706,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe //--------------------------------------------------------------------- - // Implementation of Lifecycle interface + // Implementation of SmartLifecycle interface //--------------------------------------------------------------------- @Override diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java b/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java index 3b805a962e..3f64506528 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java @@ -47,6 +47,7 @@ public class SettableListenableFuture implements ListenableFuture { this.listenableFuture = new ListenableFutureTask(this.settableTask); } + /** * Set the value of this future. This method will return {@code true} if * the value was set successfully, or {@code false} if the future has already @@ -135,7 +136,6 @@ public class SettableListenableFuture implements ListenableFuture { * Subclasses can override this method to implement interruption of the future's * computation. The method is invoked automatically by a successful call to * {@link #cancel(boolean) cancel(true)}. - * *

The default implementation does nothing. */ protected void interruptTask() { diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java index f7170925bb..ab67e4bf4c 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ import org.springframework.util.ClassUtils; * @see #doShutdown() */ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccessor - implements SmartLifecycle, BeanNameAware, DisposableBean { + implements BeanNameAware, DisposableBean, SmartLifecycle { private String clientId; diff --git a/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingAsyncClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingAsyncClientHttpRequest.java index f38221ca5b..7b5304a8a6 100644 --- a/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingAsyncClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingAsyncClientHttpRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ import org.springframework.util.concurrent.ListenableFuture; * * @author Arjen Poutsma * @since 3.0 - * @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest(java.net.URI, org.springframework.http.HttpMethod) + * @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest */ final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHttpRequest { @@ -47,13 +47,16 @@ final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsync private final AsyncListenableTaskExecutor taskExecutor; + SimpleBufferingAsyncClientHttpRequest(HttpURLConnection connection, boolean outputStreaming, AsyncListenableTaskExecutor taskExecutor) { + this.connection = connection; this.outputStreaming = outputStreaming; this.taskExecutor = taskExecutor; } + @Override public HttpMethod getMethod() { return HttpMethod.valueOf(this.connection.getRequestMethod()); @@ -72,7 +75,8 @@ final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsync @Override protected ListenableFuture executeInternal( final HttpHeaders headers, final byte[] bufferedOutput) throws IOException { - return taskExecutor.submitListenable(new Callable() { + + return this.taskExecutor.submitListenable(new Callable() { @Override public ClientHttpResponse call() throws Exception { for (Map.Entry> entry : headers.entrySet()) { @@ -81,11 +85,9 @@ final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsync connection.addRequestProperty(headerName, headerValue); } } - if (connection.getDoOutput() && outputStreaming) { connection.setFixedLengthStreamingMode(bufferedOutput.length); } - connection.connect(); if (connection.getDoOutput()) { FileCopyUtils.copy(bufferedOutput, connection.getOutputStream()); diff --git a/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingAsyncClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingAsyncClientHttpRequest.java index 6681196d8c..14c95e584d 100644 --- a/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingAsyncClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingAsyncClientHttpRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,13 +33,12 @@ import org.springframework.util.concurrent.ListenableFuture; /** * {@link org.springframework.http.client.ClientHttpRequest} implementation that uses - * standard J2SE facilities to execute streaming requests. Created via the {@link + * standard Java facilities to execute streaming requests. Created via the {@link * org.springframework.http.client.SimpleClientHttpRequestFactory}. * * @author Arjen Poutsma - * @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest(java.net.URI, - * org.springframework.http.HttpMethod) * @since 3.0 + * @see org.springframework.http.client.SimpleClientHttpRequestFactory#createRequest */ final class SimpleStreamingAsyncClientHttpRequest extends AbstractAsyncClientHttpRequest { @@ -53,14 +52,17 @@ final class SimpleStreamingAsyncClientHttpRequest extends AbstractAsyncClientHtt private final AsyncListenableTaskExecutor taskExecutor; + SimpleStreamingAsyncClientHttpRequest(HttpURLConnection connection, int chunkSize, boolean outputStreaming, AsyncListenableTaskExecutor taskExecutor) { + this.connection = connection; this.chunkSize = chunkSize; this.outputStreaming = outputStreaming; this.taskExecutor = taskExecutor; } + @Override public HttpMethod getMethod() { return HttpMethod.valueOf(this.connection.getRequestMethod()); @@ -106,8 +108,7 @@ final class SimpleStreamingAsyncClientHttpRequest extends AbstractAsyncClientHtt } @Override - protected ListenableFuture executeInternal(final HttpHeaders headers) - throws IOException { + protected ListenableFuture executeInternal(final HttpHeaders headers) throws IOException { return taskExecutor.submitListenable(new Callable() { @Override public ClientHttpResponse call() throws Exception { diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java index 9c0de4787e..a5d60b6dba 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java @@ -266,13 +266,11 @@ import java.util.concurrent.Callable; @Mapping public @interface RequestMapping { - /** * Assign a name to this mapping. - *

Supported at the method and also at type level! - * When used on both levels, a combined name is derived by - * concatenation with "#" as separator. - * + *

Supported at the type level as well as at the method level! + * When used on both levels, a combined name is derived by concatenation + * with "#" as separator. * @see org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder * @see org.springframework.web.servlet.handler.HandlerMethodMappingNamingStrategy */ diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/StandardWebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/StandardWebSocketClient.java index 2addd49ed2..9251025a97 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/StandardWebSocketClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/StandardWebSocketClient.java @@ -116,16 +116,16 @@ public class StandardWebSocketClient extends AbstractWebSocketClient { final StandardWebSocketSession session = new StandardWebSocketSession(headers, attributes, localAddress, remoteAddress); - final ClientEndpointConfig.Builder configBuidler = ClientEndpointConfig.Builder.create(); - configBuidler.configurator(new StandardWebSocketClientConfigurator(headers)); - configBuidler.preferredSubprotocols(protocols); - configBuidler.extensions(adaptExtensions(extensions)); + final ClientEndpointConfig.Builder configBuilder = ClientEndpointConfig.Builder.create(); + configBuilder.configurator(new StandardWebSocketClientConfigurator(headers)); + configBuilder.preferredSubprotocols(protocols); + configBuilder.extensions(adaptExtensions(extensions)); final Endpoint endpoint = new StandardWebSocketHandlerAdapter(webSocketHandler, session); Callable connectTask = new Callable() { @Override public WebSocketSession call() throws Exception { - webSocketContainer.connectToServer(endpoint, configBuidler.build(), uri); + webSocketContainer.connectToServer(endpoint, configBuilder.build(), uri); return session; } }; @@ -142,8 +142,8 @@ public class StandardWebSocketClient extends AbstractWebSocketClient { private static List adaptExtensions(List extensions) { List result = new ArrayList(); - for (WebSocketExtension e : extensions) { - result.add(new WebSocketToStandardExtensionAdapter(e)); + for (WebSocketExtension extension : extensions) { + result.add(new WebSocketToStandardExtensionAdapter(extension)); } return result; }