From afe106e2541dd2f7b8932d04c723d50ca15686e6 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 15 Jul 2016 22:47:12 +0200 Subject: [PATCH] Polishing --- .../web/socket/sockjs/client/UndertowXhrTransport.java | 8 +++----- .../config/annotation/WebSocketConfigurationTests.java | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java index 863059a4e5..4f70016a12 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java @@ -1,11 +1,11 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 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. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -326,14 +326,12 @@ public class UndertowXhrTransport extends AbstractXhrTransport { result.getResponse().putAttachment(RESPONSE_BODY, string); latch.countDown(); } - @Override protected void error(IOException ex) { onFailure(latch, ex); } }.setup(result.getResponseChannel()); } - @Override public void failed(IOException ex) { onFailure(latch, ex); @@ -473,7 +471,7 @@ public class UndertowXhrTransport extends AbstractXhrTransport { public void onFailure(Throwable failure) { IoUtils.safeClose(this.connection); - if (connectFuture.setException(failure)) { + if (this.connectFuture.setException(failure)) { return; } if (this.session.isDisconnected()) { diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java index 1a66397b7b..f4aa046048 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 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. @@ -61,7 +61,7 @@ public class WebSocketConfigurationTests extends AbstractWebSocketIntegrationTes @Override protected Class[] getAnnotatedConfigClasses() { - return new Class[] { TestConfig.class }; + return new Class[] {TestConfig.class}; } @Test -- GitLab