Use the diamond syntax
Closes gh-1450
This commit is contained in:
@@ -424,7 +424,7 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||
}
|
||||
|
||||
protected void handleMessageInternal(Message<?> message, String lookupDestination) {
|
||||
List<Match> matches = new ArrayList<Match>();
|
||||
List<Match> matches = new ArrayList<>();
|
||||
|
||||
List<T> mappingsByUrl = this.destinationLookup.get(lookupDestination);
|
||||
if (mappingsByUrl != null) {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class BufferingStompDecoder {
|
||||
|
||||
private final int bufferSizeLimit;
|
||||
|
||||
private final Queue<ByteBuffer> chunks = new LinkedBlockingQueue<ByteBuffer>();
|
||||
private final Queue<ByteBuffer> chunks = new LinkedBlockingQueue<>();
|
||||
|
||||
private volatile Integer expectedContentLength;
|
||||
|
||||
@@ -107,7 +107,7 @@ public class BufferingStompDecoder {
|
||||
}
|
||||
|
||||
ByteBuffer bufferToDecode = assembleChunksAndReset();
|
||||
MultiValueMap<String, String> headers = new LinkedMultiValueMap<String, String>();
|
||||
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
|
||||
List<Message<byte[]>> messages = this.stompDecoder.decode(bufferToDecode, headers);
|
||||
|
||||
if (bufferToDecode.hasRemaining()) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class MessageReceivingTemplateTests {
|
||||
|
||||
@Test
|
||||
public void receive() {
|
||||
Message<?> expected = new GenericMessage<Object>("payload");
|
||||
Message<?> expected = new GenericMessage<>("payload");
|
||||
this.template.setDefaultDestination("home");
|
||||
this.template.setReceiveMessage(expected);
|
||||
Message<?> actual = this.template.receive();
|
||||
@@ -69,7 +69,7 @@ public class MessageReceivingTemplateTests {
|
||||
|
||||
@Test
|
||||
public void receiveFromDestination() {
|
||||
Message<?> expected = new GenericMessage<Object>("payload");
|
||||
Message<?> expected = new GenericMessage<>("payload");
|
||||
this.template.setReceiveMessage(expected);
|
||||
Message<?> actual = this.template.receive("somewhere");
|
||||
|
||||
@@ -79,7 +79,7 @@ public class MessageReceivingTemplateTests {
|
||||
|
||||
@Test
|
||||
public void receiveAndConvert() {
|
||||
Message<?> expected = new GenericMessage<Object>("payload");
|
||||
Message<?> expected = new GenericMessage<>("payload");
|
||||
this.template.setDefaultDestination("home");
|
||||
this.template.setReceiveMessage(expected);
|
||||
String payload = this.template.receiveAndConvert(String.class);
|
||||
@@ -90,7 +90,7 @@ public class MessageReceivingTemplateTests {
|
||||
|
||||
@Test
|
||||
public void receiveAndConvertFromDestination() {
|
||||
Message<?> expected = new GenericMessage<Object>("payload");
|
||||
Message<?> expected = new GenericMessage<>("payload");
|
||||
this.template.setReceiveMessage(expected);
|
||||
String payload = this.template.receiveAndConvert("somewhere", String.class);
|
||||
|
||||
@@ -100,7 +100,7 @@ public class MessageReceivingTemplateTests {
|
||||
|
||||
@Test
|
||||
public void receiveAndConvertFailed() {
|
||||
Message<?> expected = new GenericMessage<Object>("not a number test");
|
||||
Message<?> expected = new GenericMessage<>("not a number test");
|
||||
this.template.setReceiveMessage(expected);
|
||||
this.template.setMessageConverter(new GenericMessageConverter());
|
||||
|
||||
@@ -111,7 +111,7 @@ public class MessageReceivingTemplateTests {
|
||||
|
||||
@Test
|
||||
public void receiveAndConvertNoConverter() {
|
||||
Message<?> expected = new GenericMessage<Object>("payload");
|
||||
Message<?> expected = new GenericMessage<>("payload");
|
||||
this.template.setDefaultDestination("home");
|
||||
this.template.setReceiveMessage(expected);
|
||||
this.template.setMessageConverter(new GenericMessageConverter());
|
||||
|
||||
Reference in New Issue
Block a user