Spring cleaning: use diamond operator
This commit is contained in:
@@ -77,7 +77,7 @@ class DestinationResolvingMessagingTemplateTests {
|
||||
void sendNoDestinationResolver() {
|
||||
TestDestinationResolvingMessagingTemplate template = new TestDestinationResolvingMessagingTemplate();
|
||||
assertThatIllegalStateException().isThrownBy(() ->
|
||||
template.send("myChannel", new GenericMessage<Object>("payload")));
|
||||
template.send("myChannel", new GenericMessage<>("payload")));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -67,7 +67,7 @@ class MessageRequestReplyTemplateTests {
|
||||
@Test
|
||||
void sendAndReceiveMissingDestination() {
|
||||
assertThatIllegalStateException().isThrownBy(() ->
|
||||
this.template.sendAndReceive(new GenericMessage<Object>("request")));
|
||||
this.template.sendAndReceive(new GenericMessage<>("request")));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -103,7 +103,7 @@ class SimpAttributesContextHolderTests {
|
||||
@Test
|
||||
void setAttributesFromMessageWithMissingSessionId() {
|
||||
assertThatIllegalStateException().isThrownBy(() ->
|
||||
SimpAttributesContextHolder.setAttributesFromMessage(new GenericMessage<Object>("")))
|
||||
SimpAttributesContextHolder.setAttributesFromMessage(new GenericMessage<>("")))
|
||||
.withMessageStartingWith("No session id in");
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ class SimpMessagingTemplateTests {
|
||||
void convertAndSendWithCustomHeaderNonNative() {
|
||||
Map<String, Object> headers = new HashMap<>();
|
||||
headers.put("key", "value");
|
||||
headers.put(NativeMessageHeaderAccessor.NATIVE_HEADERS, new LinkedMultiValueMap<String, String>());
|
||||
headers.put(NativeMessageHeaderAccessor.NATIVE_HEADERS, new LinkedMultiValueMap<>());
|
||||
this.messagingTemplate.convertAndSend("/foo", "data", headers);
|
||||
|
||||
List<Message<byte[]>> messages = this.messageChannel.getMessages();
|
||||
|
||||
@@ -69,7 +69,7 @@ class BrokerMessageHandlerTests {
|
||||
|
||||
@Test
|
||||
void handleMessageWhenBrokerNotRunning() {
|
||||
this.handler.handleMessage(new GenericMessage<Object>("payload"));
|
||||
this.handler.handleMessage(new GenericMessage<>("payload"));
|
||||
assertThat(this.handler.messages).isEqualTo(Collections.emptyList());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user