Fixes for ignored tests after last week's nullability commit

Issue: SPR-15540
This commit is contained in:
Juergen Hoeller
2017-06-13 11:37:58 +02:00
parent 58242f2249
commit 7dd8dc62a5
9 changed files with 30 additions and 53 deletions

View File

@@ -179,8 +179,8 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
}
}
}
else if (annotation instanceof SendTo) {
SendTo sendTo = (SendTo) annotation;
else {
SendTo sendTo = (SendTo) annotation; // possibly null
String[] destinations = getTargetDestinations(sendTo, message, this.defaultDestinationPrefix);
for (String destination : destinations) {
destination = this.placeholderHelper.replacePlaceholders(destination, varResolver);

View File

@@ -27,7 +27,6 @@ import javax.security.auth.Subject;
import com.fasterxml.jackson.annotation.JsonView;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
@@ -176,7 +175,6 @@ public class SendToMethodReturnValueHandlerTests {
}
@Test
@Ignore // TODO: NULLABLE
public void sendToNoAnnotations() throws Exception {
given(this.messageChannel.send(any(Message.class))).willReturn(true);
@@ -346,7 +344,6 @@ public class SendToMethodReturnValueHandlerTests {
}
@Test
@Ignore // TODO: NULLABLE
public void testHeadersToSend() throws Exception {
Message<?> message = createMessage("sess1", "sub1", "/app", "/dest", null);
@@ -530,7 +527,6 @@ public class SendToMethodReturnValueHandlerTests {
}
@Test
@Ignore // TODO: NULLABLE
public void jsonView() throws Exception {
given(this.messageChannel.send(any(Message.class))).willReturn(true);

View File

@@ -26,7 +26,6 @@ import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
@@ -238,7 +237,6 @@ public class SimpAnnotationMethodMessageHandlerTests {
}
@Test
@Ignore // TODO: NULLABLE
@SuppressWarnings("unchecked")
public void listenableFutureSuccess() {
Message emptyMessage = (Message) MessageBuilder.withPayload(new byte[0]).build();
@@ -277,7 +275,6 @@ public class SimpAnnotationMethodMessageHandlerTests {
}
@Test
@Ignore // TODO: NULLABLE
@SuppressWarnings("unchecked")
public void completableFutureSuccess() {
Message emptyMessage = (Message) MessageBuilder.withPayload(new byte[0]).build();

View File

@@ -19,7 +19,6 @@ package org.springframework.messaging.simp.user;
import java.nio.charset.StandardCharsets;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
@@ -123,7 +122,6 @@ public class UserDestinationMessageHandlerTests {
}
@Test
@Ignore // TODO: NULLABLE
public void handleMessageFromBrokerWithActiveSession() {
TestSimpUser simpUser = new TestSimpUser("joe");
simpUser.addSessions(new TestSimpSession("123"));