diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java index 3784c9815c4d3521ff4f9ac8af4983473ba58c32..3ae7bba39a48ac0a3a5d16a1abb23f6767e9a726 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java @@ -593,7 +593,7 @@ public abstract class AnnotationUtils { } if (nestedAnnotationsAsMap && value instanceof Annotation) { attrs.put(method.getName(), - getAnnotationAttributes((Annotation) value, classValuesAsString, true)); + getAnnotationAttributes((Annotation) value, classValuesAsString, true)); } else if (nestedAnnotationsAsMap && value instanceof Annotation[]) { Annotation[] realAnnotations = (Annotation[]) value; 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 14c95e584d5b9e71f54619330fe819ff68b35ea7..34ba8911f2583980859e88171a220fb0730c0c06 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 @@ -109,7 +109,7 @@ final class SimpleStreamingAsyncClientHttpRequest extends AbstractAsyncClientHtt @Override protected ListenableFuture executeInternal(final HttpHeaders headers) throws IOException { - return taskExecutor.submitListenable(new Callable() { + return this.taskExecutor.submitListenable(new Callable() { @Override public ClientHttpResponse call() throws Exception { try { 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 9251025a97ecdc1cdae3723d5c2d8f0ec8d3cce6..fdea416ddec711dfe91f50214299c419e05f963e 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 @@ -74,9 +74,8 @@ public class StandardWebSocketClient extends AbstractWebSocketClient { /** * Constructor accepting an existing {@link WebSocketContainer} instance. - * - *

For XML configuration see {@link WebSocketContainerFactoryBean}. For Java - * configuration use {@code ContainerProvider.getWebSocketContainer()} to obtain + *

For XML configuration, see {@link WebSocketContainerFactoryBean}. For Java + * configuration, use {@code ContainerProvider.getWebSocketContainer()} to obtain * the {@code WebSocketContainer} instance. */ public StandardWebSocketClient(WebSocketContainer webSocketContainer) { @@ -89,8 +88,7 @@ public class StandardWebSocketClient extends AbstractWebSocketClient { * Set an {@link AsyncListenableTaskExecutor} to use when opening connections. * If this property is set to {@code null}, calls to any of the * {@code doHandshake} methods will block until the connection is established. - * - *

By default an instance of {@code SimpleAsyncTaskExecutor} is used. + *

By default, an instance of {@code SimpleAsyncTaskExecutor} is used. */ public void setTaskExecutor(AsyncListenableTaskExecutor taskExecutor) { this.taskExecutor = taskExecutor; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java index 0d5fbe63ac1ac0d456b57e0ccb026fe3b502f209..7ccf6517579a0612b18037b13ee7d29eb4884807 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java @@ -106,11 +106,9 @@ public abstract class AbstractSockJsService implements SockJsService { * iframe so that code in the iframe can run from a domain local to the SockJS * server. Since the iframe needs to load the SockJS javascript client library, * this property allows specifying where to load it from. - * *

By default this is set to point to - * "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js". However it can - * also be set to point to a URL served by the application. - * + * "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js". + * However, it can also be set to point to a URL served by the application. *

Note that it's possible to specify a relative URL in which case the URL * must be relative to the iframe URL. For example assuming a SockJS endpoint * mapped to "/sockjs", and resulting iframe URL "/sockjs/iframe.html", then the @@ -153,16 +151,13 @@ public abstract class AbstractSockJsService implements SockJsService { * clients with a "cookie_needed" boolean property that indicates whether the use of a * JSESSIONID cookie is required for the application to function correctly, e.g. for * load balancing or in Java Servlet containers for the use of an HTTP session. - * *

This is especially important for IE 8,9 that support XDomainRequest -- a modified * AJAX/XHR -- that can do requests across domains but does not send any cookies. In * those cases, the SockJS client prefers the "iframe-htmlfile" transport over * "xdr-streaming" in order to be able to send cookies. - * *

The SockJS protocol also expects a SockJS service to echo back the JSESSIONID * cookie when this property is set to true. However, when running in a Servlet * container this is not necessary since the container takes care of it. - * *

The default value is "true" to maximize the chance for applications to work * correctly in IE 8,9 with support for cookies (and the JSESSIONID cookie in * particular). However, an application can choose to set this to "false" if @@ -363,7 +358,6 @@ public abstract class AbstractSockJsService implements SockJsService { protected void addCorsHeaders(ServerHttpRequest request, ServerHttpResponse response, HttpMethod... httpMethods) { - HttpHeaders requestHeaders = request.getHeaders(); HttpHeaders responseHeaders = response.getHeaders(); @@ -444,6 +438,7 @@ public abstract class AbstractSockJsService implements SockJsService { } }; + private final SockJsRequestHandler iframeHandler = new SockJsRequestHandler() { private static final String IFRAME_CONTENT =