Skip to content

Commit 597ef09

Browse files
committed
Suppress warnings and remove unused imports
1 parent 845a6b0 commit 597ef09

File tree

14 files changed

+22
-24
lines changed

14 files changed

+22
-24
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompReactorNettyTcpClient.java

Lines changed: 1 addition & 2 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.
@@ -17,7 +17,6 @@
1717
package org.springframework.messaging.simp.stomp;
1818

1919
import org.springframework.messaging.tcp.reactor.ReactorNettyTcpClient;
20-
import reactor.tcp.encoding.Codec;
2120

2221
/**
2322
* A variation of {@link ReactorNettyTcpClient} for sending and receiving STOMP frames.

spring-messaging/src/main/java/org/springframework/messaging/support/AbstractSubscribableChannel.java

Lines changed: 1 addition & 2 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.
@@ -20,7 +20,6 @@
2020
import org.springframework.messaging.SubscribableChannel;
2121

2222
import java.util.Collections;
23-
import java.util.List;
2423
import java.util.Set;
2524
import java.util.concurrent.CopyOnWriteArraySet;
2625

spring-messaging/src/main/java/org/springframework/messaging/support/ExecutorSubscribableChannel.java

Lines changed: 1 addition & 3 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.
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.messaging.support;
1818

19-
import java.util.Set;
20-
import java.util.concurrent.CopyOnWriteArraySet;
2119
import java.util.concurrent.Executor;
2220

2321
import org.springframework.messaging.Message;

spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java

Lines changed: 1 addition & 2 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.
@@ -17,7 +17,6 @@
1717
package org.springframework.messaging.support;
1818

1919
import java.io.Serializable;
20-
import java.util.HashMap;
2120
import java.util.Map;
2221

2322
import org.springframework.messaging.Message;

spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandlerTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@
2323

2424
import org.junit.Before;
2525
import org.junit.Test;
26+
2627
import org.mockito.ArgumentCaptor;
2728
import org.mockito.Captor;
2829
import org.mockito.Mock;
2930
import org.mockito.MockitoAnnotations;
31+
3032
import org.springframework.core.MethodParameter;
3133
import org.springframework.messaging.Message;
3234
import org.springframework.messaging.MessageChannel;
3335
import org.springframework.messaging.handler.annotation.SendTo;
3436
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
3537
import org.springframework.messaging.simp.SimpMessagingTemplate;
36-
import org.springframework.messaging.simp.TestPrincipal;
3738
import org.springframework.messaging.simp.annotation.SendToUser;
3839
import org.springframework.messaging.simp.user.DestinationUserNameProvider;
3940
import org.springframework.messaging.support.MessageBuilder;
@@ -70,8 +71,8 @@ public class SendToMethodReturnValueHandlerTests {
7071
private MethodParameter sendToUserDefaultDestReturnType;
7172

7273

73-
@SuppressWarnings("unchecked")
7474
@Before
75+
@SuppressWarnings({ "unchecked", "rawtypes" })
7576
public void setup() throws Exception {
7677

7778
MockitoAnnotations.initMocks(this);

spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandlerTests.java

Lines changed: 2 additions & 2 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.
@@ -65,8 +65,8 @@ public class SubscriptionMethodReturnValueHandlerTests {
6565
private MethodParameter messageMappingReturnType;
6666

6767

68-
@SuppressWarnings("unchecked")
6968
@Before
69+
@SuppressWarnings({ "unchecked", "rawtypes" })
7070
public void setup() throws Exception {
7171

7272
MockitoAnnotations.initMocks(this);

spring-messaging/src/test/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistrationTests.java

Lines changed: 2 additions & 3 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.
@@ -16,16 +16,15 @@
1616

1717
package org.springframework.messaging.simp.config;
1818

19-
import org.junit.Before;
2019
import org.junit.Test;
20+
2121
import org.springframework.messaging.MessageChannel;
2222
import org.springframework.messaging.StubMessageChannel;
2323
import org.springframework.messaging.SubscribableChannel;
2424
import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler;
2525

2626
import java.util.Arrays;
2727

28-
import static org.junit.Assert.assertArrayEquals;
2928
import static org.junit.Assert.assertEquals;
3029

3130
/**

spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public void setup() {
5959

6060

6161
@Test
62+
@SuppressWarnings("rawtypes")
6263
public void handleSubscribe() {
6364
when(this.brokerChannel.send(Mockito.any(Message.class))).thenReturn(true);
6465
this.messageHandler.handleMessage(createMessage(SimpMessageType.SUBSCRIBE, "joe", SESSION_ID, "/user/queue/foo"));
@@ -71,6 +72,7 @@ public void handleSubscribe() {
7172
}
7273

7374
@Test
75+
@SuppressWarnings("rawtypes")
7476
public void handleUnsubscribe() {
7577
when(this.brokerChannel.send(Mockito.any(Message.class))).thenReturn(true);
7678
this.messageHandler.handleMessage(createMessage(SimpMessageType.UNSUBSCRIBE, "joe", "123", "/user/queue/foo"));
@@ -83,6 +85,7 @@ public void handleUnsubscribe() {
8385
}
8486

8587
@Test
88+
@SuppressWarnings("rawtypes")
8689
public void handleMessage() {
8790
this.registry.registerSessionId("joe", "123");
8891
when(this.brokerChannel.send(Mockito.any(Message.class))).thenReturn(true);

spring-websocket/src/test/java/org/springframework/web/socket/config/HandlersBeanDefinitionParserTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public void websocketHandlersAttributes() {
151151
}
152152

153153
@Test
154+
@SuppressWarnings("unchecked")
154155
public void sockJsSupport() {
155156
loadBeanDefinitions("websocket-config-handlers-sockjs.xml");
156157
SimpleUrlHandlerMapping handlerMapping = appContext.getBean(SimpleUrlHandlerMapping.class);
@@ -183,6 +184,7 @@ public void sockJsSupport() {
183184
}
184185

185186
@Test
187+
@SuppressWarnings("unchecked")
186188
public void sockJsAttributesSupport() {
187189
loadBeanDefinitions("websocket-config-handlers-sockjs-attributes.xml");
188190
SimpleUrlHandlerMapping handlerMapping = appContext.getBean(SimpleUrlHandlerMapping.class);
@@ -270,6 +272,7 @@ public void afterHandshake(ServerHttpRequest request, ServerHttpResponse respons
270272

271273
class BarTestInterceptor extends FooTestInterceptor {}
272274

275+
@SuppressWarnings({ "unchecked", "rawtypes" })
273276
class TestTaskScheduler implements TaskScheduler {
274277
@Override
275278
public ScheduledFuture schedule(Runnable task, Trigger trigger) { return null; }

spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.springframework.web.socket.AbstractWebSocketIntegrationTests;
3232
import org.springframework.web.socket.JettyWebSocketTestServer;
3333
import org.springframework.web.socket.TomcatWebSocketTestServer;
34-
import org.springframework.web.socket.UndertowTestServer;
3534
import org.springframework.web.socket.WebSocketSession;
3635
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
3736
import org.springframework.web.socket.client.standard.StandardWebSocketClient;

spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java

Lines changed: 1 addition & 3 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.
@@ -35,8 +35,6 @@
3535
import org.springframework.messaging.handler.annotation.SendTo;
3636
import org.springframework.messaging.simp.SimpMessageType;
3737
import org.springframework.messaging.simp.annotation.SubscribeMapping;
38-
import org.springframework.messaging.simp.config.ChannelRegistration;
39-
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
4038
import org.springframework.messaging.simp.stomp.StompCommand;
4139
import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
4240
import org.springframework.stereotype.Controller;

spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class StompSubProtocolHandlerTests {
5757

5858
private MessageChannel channel;
5959

60+
@SuppressWarnings("rawtypes")
6061
private ArgumentCaptor<Message> messageCaptor;
6162

6263

spring-websocket/src/test/java/org/springframework/web/socket/server/DefaultHandshakeHandlerTests.java

Lines changed: 1 addition & 2 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,7 +33,6 @@
3333
import org.springframework.web.socket.handler.TextWebSocketHandler;
3434
import org.springframework.web.socket.WebSocketHttpHeaders;
3535

36-
import static org.junit.Assert.assertEquals;
3736
import static org.mockito.Mockito.*;
3837

3938
/**

spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/AbstractSockJsServiceTests.java

Lines changed: 2 additions & 2 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.
@@ -28,7 +28,6 @@
2828
import org.springframework.web.socket.AbstractHttpRequestTests;
2929
import org.springframework.web.socket.WebSocketHandler;
3030
import org.springframework.web.socket.sockjs.SockJsException;
31-
import org.springframework.web.socket.sockjs.transport.TransportType;
3231

3332
import static org.junit.Assert.*;
3433

@@ -164,6 +163,7 @@ private static class TestSockJsService extends AbstractSockJsService {
164163

165164
private String sessionId;
166165

166+
@SuppressWarnings("unused")
167167
private String transport;
168168

169169
private WebSocketHandler handler;

0 commit comments

Comments
 (0)