Explicit type can be replaced by <>
Issue: SPR-13188
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -52,7 +52,7 @@ public class StubTextMessage implements TextMessage {
|
||||
|
||||
private boolean redelivered;
|
||||
|
||||
private ConcurrentHashMap<String, Object> properties = new ConcurrentHashMap<String, Object>();
|
||||
private ConcurrentHashMap<String, Object> properties = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
public StubTextMessage() {
|
||||
|
||||
@@ -164,7 +164,7 @@ public class JmsListenerContainerFactoryIntegrationTests {
|
||||
|
||||
static class JmsEndpointSampleBean implements JmsEndpointSampleInterface {
|
||||
|
||||
private final Map<String, Boolean> invocations = new HashMap<String, Boolean>();
|
||||
private final Map<String, Boolean> invocations = new HashMap<>();
|
||||
|
||||
public void handleIt(@Payload String msg, @Header("my-header") String myHeader) {
|
||||
invocations.put("handleIt", true);
|
||||
|
||||
@@ -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.
|
||||
@@ -402,7 +402,7 @@ public class JmsNamespaceHandlerTests {
|
||||
|
||||
@Override
|
||||
protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) {
|
||||
this.registeredComponents = new HashSet<ComponentDefinition>();
|
||||
this.registeredComponents = new HashSet<>();
|
||||
beanDefinitionReader.setEventListener(new StoringReaderEventListener(this.registeredComponents));
|
||||
beanDefinitionReader.setSourceExtractor(new PassThroughSourceExtractor());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -208,7 +208,7 @@ public class JmsMessagingTemplateTests {
|
||||
@Test
|
||||
public void convertAndSendPayloadAndHeaders() throws JMSException {
|
||||
Destination destination = new Destination() {};
|
||||
Map<String, Object> headers = new HashMap<String, Object>();
|
||||
Map<String, Object> headers = new HashMap<>();
|
||||
headers.put("foo", "bar");
|
||||
|
||||
messagingTemplate.convertAndSend(destination, "Hello", headers);
|
||||
@@ -218,7 +218,7 @@ public class JmsMessagingTemplateTests {
|
||||
|
||||
@Test
|
||||
public void convertAndSendPayloadAndHeadersName() throws JMSException {
|
||||
Map<String, Object> headers = new HashMap<String, Object>();
|
||||
Map<String, Object> headers = new HashMap<>();
|
||||
headers.put("foo", "bar");
|
||||
|
||||
messagingTemplate.convertAndSend("myQueue", "Hello", headers);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -35,7 +35,7 @@ public class JmsGatewaySupportTests {
|
||||
@Test
|
||||
public void testJmsGatewaySupportWithConnectionFactory() throws Exception {
|
||||
ConnectionFactory mockConnectionFactory = mock(ConnectionFactory.class);
|
||||
final List<String> test = new ArrayList<String>(1);
|
||||
final List<String> test = new ArrayList<>(1);
|
||||
JmsGatewaySupport gateway = new JmsGatewaySupport() {
|
||||
@Override
|
||||
protected void initGateway() {
|
||||
@@ -52,7 +52,7 @@ public class JmsGatewaySupportTests {
|
||||
@Test
|
||||
public void testJmsGatewaySupportWithJmsTemplate() throws Exception {
|
||||
JmsTemplate template = new JmsTemplate();
|
||||
final List<String> test = new ArrayList<String>(1);
|
||||
final List<String> test = new ArrayList<>(1);
|
||||
JmsGatewaySupport gateway = new JmsGatewaySupport() {
|
||||
@Override
|
||||
protected void initGateway() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -170,7 +170,7 @@ public class SimpleMessageListenerContainerTests extends AbstractMessageListener
|
||||
final ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
|
||||
given(connectionFactory.createConnection()).willReturn(connection);
|
||||
|
||||
final Set<String> failure = new HashSet<String>(1);
|
||||
final Set<String> failure = new HashSet<>(1);
|
||||
|
||||
this.container.setConnectionFactory(connectionFactory);
|
||||
this.container.setDestinationName(DESTINATION_NAME);
|
||||
|
||||
@@ -92,7 +92,7 @@ public class SimpleMessageConverterTests {
|
||||
Session session = mock(Session.class);
|
||||
MapMessage message = mock(MapMessage.class);
|
||||
|
||||
Map<String, String> content = new HashMap<String, String>(2);
|
||||
Map<String, String> content = new HashMap<>(2);
|
||||
content.put("key1", "value1");
|
||||
content.put("key2", "value2");
|
||||
|
||||
@@ -159,7 +159,7 @@ public class SimpleMessageConverterTests {
|
||||
Session session = mock(Session.class);
|
||||
given(session.createMapMessage()).willReturn(message);
|
||||
|
||||
Map<Integer, String> content = new HashMap<Integer, String>(1);
|
||||
Map<Integer, String> content = new HashMap<>(1);
|
||||
content.put(1, "value1");
|
||||
|
||||
SimpleMessageConverter converter = new SimpleMessageConverter();
|
||||
@@ -176,7 +176,7 @@ public class SimpleMessageConverterTests {
|
||||
Session session = mock(Session.class);
|
||||
given(session.createMapMessage()).willReturn(message);
|
||||
|
||||
Map<Object, String> content = new HashMap<Object, String>(1);
|
||||
Map<Object, String> content = new HashMap<>(1);
|
||||
content.put(null, "value1");
|
||||
|
||||
SimpleMessageConverter converter = new SimpleMessageConverter();
|
||||
|
||||
@@ -117,7 +117,7 @@ public class MappingJackson2MessageConverterTests {
|
||||
public void toTextMessageWithMap() throws Exception {
|
||||
converter.setTargetType(MessageType.TEXT);
|
||||
TextMessage textMessageMock = mock(TextMessage.class);
|
||||
Map<String, String> toBeMarshalled = new HashMap<String, String>();
|
||||
Map<String, String> toBeMarshalled = new HashMap<>();
|
||||
toBeMarshalled.put("foo", "bar");
|
||||
|
||||
given(sessionMock.createTextMessage(isA(String.class))).willReturn(textMessageMock);
|
||||
|
||||
Reference in New Issue
Block a user