Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-09-28 14:49:18 -0400
committerRyan D. Brooks2015-09-28 14:49:18 -0400
commit071fcbc5cca4e22e650bb459701f5fc9be701013 (patch)
treeac629d866ecfea675bc4e134c68315440282d560 /plugins/org.eclipse.osee.framework.messaging
parentb4f6f62b0d3af365b67a3786dbb24c97fa638536 (diff)
downloadorg.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.gz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.xz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.zip
refactor: Use type inference when invoking a generic constructor
Diffstat (limited to 'plugins/org.eclipse.osee.framework.messaging')
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java2
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java4
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java4
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java2
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java2
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java10
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java10
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java6
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java2
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java8
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java4
12 files changed, 28 insertions, 28 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java
index c6cff5b57b..8c75233dca 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java
@@ -179,7 +179,7 @@ public class ServiceHealth {
*/
public List<ServiceDescriptionPair> getServiceDescription() {
if (serviceDescription == null) {
- serviceDescription = new ArrayList<ServiceDescriptionPair>();
+ serviceDescription = new ArrayList<>();
}
return this.serviceDescription;
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java
index 8ae8388a89..64e78bf97a 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java
@@ -98,7 +98,7 @@ public class ServiceHealthRequest {
*/
public List<ServiceDescriptionPair> getServiceDescription() {
if (serviceDescription == null) {
- serviceDescription = new ArrayList<ServiceDescriptionPair>();
+ serviceDescription = new ArrayList<>();
}
return this.serviceDescription;
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java
index a442ecaf63..93d7ea2f91 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java
@@ -28,8 +28,8 @@ public class ConsoleDebugSupport {
private Map<String, Stats> receives;
public ConsoleDebugSupport(){
- sends = new ConcurrentHashMap<MessageID, Stats>();
- receives = new ConcurrentHashMap<String, Stats>();
+ sends = new ConcurrentHashMap<>();
+ receives = new ConcurrentHashMap<>();
}
protected void setPrintSends(boolean printSends){
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java
index c00b8bd9b0..72ef075eb7 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java
@@ -49,8 +49,8 @@ public class FailoverConnectionNode implements ConnectionNode, Runnable {
this.connectionNode = connectionNode;
this.exceptionListener = exceptionListener;
exceptionListener.setListener(this);
- savedSubscribes = new CopyOnWriteArrayList<SavedSubscribe>();
- connectionListeners = new CopyOnWriteArrayList<ConnectionListener>();
+ savedSubscribes = new CopyOnWriteArrayList<>();
+ connectionListeners = new CopyOnWriteArrayList<>();
this.scheduledExecutor = scheduledExecutor;
itemToCancel = this.scheduledExecutor.scheduleAtFixedRate(this, 60, 15, TimeUnit.SECONDS);
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java
index 9ad9cf89cf..243a8028fd 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java
@@ -36,7 +36,7 @@ public class MessageServiceImpl implements MessageService {
private final ConnectionNodeFactory factory;
public MessageServiceImpl(ConnectionNodeFactory factory) {
- this.connectionNodes = new ConcurrentHashMap<NodeInfo, ConnectionNode>();
+ this.connectionNodes = new ConcurrentHashMap<>();
this.factory = factory;
defaultNode = new NodeInfo("osee-jms", getDefaultURI());
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java
index 88ef7c8bd2..649dc7dfdc 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java
@@ -105,7 +105,7 @@ class ActiveMqMessageListenerWrapper implements MessageListener {
@Override
public void run() {
try {
- Map<String, Object> headers = new HashMap<String, Object>();
+ Map<String, Object> headers = new HashMap<>();
Enumeration<?> propertyNames = message.getPropertyNames();
while( propertyNames.hasMoreElements() )
{
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
index bea83d51e5..fc60894b10 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
@@ -73,10 +73,10 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
this.nodeInfo = nodeInfo;
this.exceptionListener = exceptionListener;
activeMqUtil = new ActiveMqUtil();
- topicCache = new ConcurrentHashMap<String, Topic>();
- messageProducerCache = new ConcurrentHashMap<Topic, MessageProducer>();
- regularListeners = new CompositeKeyHashMap<String, MessageConsumer, OseeMessagingListener>(64, true);
- replyListeners = new ConcurrentHashMap<String, OseeMessagingListener>();
+ topicCache = new ConcurrentHashMap<>();
+ messageProducerCache = new ConcurrentHashMap<>();
+ regularListeners = new CompositeKeyHashMap<>(64, true);
+ replyListeners = new ConcurrentHashMap<>();
}
@Override
@@ -283,7 +283,7 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
@Override
public void unsubscribe(MessageID messageId, OseeMessagingListener listener, OseeMessagingStatusCallback statusCallback) {
Map<MessageConsumer, OseeMessagingListener> listeners = regularListeners.getKeyedValues(messageId.getId());
- List<MessageConsumer> consumersToRemove = new ArrayList<MessageConsumer>();
+ List<MessageConsumer> consumersToRemove = new ArrayList<>();
if (listeners != null) {
try {
for (Entry<MessageConsumer, OseeMessagingListener> entry : listeners.entrySet()) {
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java
index 5797d3e10a..0a28c543b7 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java
@@ -82,10 +82,10 @@ class ConnectionNodeActiveMqNoWait implements ConnectionNodeFailoverSupport, Mes
this.nodeInfo = nodeInfo;
this.exceptionListener = exceptionListener;
activeMqUtil = new ActiveMqUtil();
- topicCache = new ConcurrentHashMap<String, Topic>();
- messageProducerCache = new ConcurrentHashMap<Topic, MessageProducer>();
- regularListeners = new CompositeKeyHashMap<String, MessageConsumer, OseeMessagingListener>(64, true);
- replyListeners = new ConcurrentHashMap<String, OseeMessagingListener>();
+ topicCache = new ConcurrentHashMap<>();
+ messageProducerCache = new ConcurrentHashMap<>();
+ regularListeners = new CompositeKeyHashMap<>(64, true);
+ replyListeners = new ConcurrentHashMap<>();
}
@Override
@@ -360,7 +360,7 @@ class ConnectionNodeActiveMqNoWait implements ConnectionNodeFailoverSupport, Mes
@Override
public void run() {
Map<MessageConsumer, OseeMessagingListener> listeners = regularListeners.getKeyedValues(messageId.getId());
- List<MessageConsumer> consumersToRemove = new ArrayList<MessageConsumer>();
+ List<MessageConsumer> consumersToRemove = new ArrayList<>();
if (listeners != null) {
try {
for (Entry<MessageConsumer, OseeMessagingListener> entry : listeners.entrySet()) {
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java
index b23bb87c40..5aa1164028 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java
@@ -22,16 +22,16 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class ConcurrentListMap<MAP_TYPE, LIST_TYPE> {
private final Map<MAP_TYPE, List<LIST_TYPE>> data;
- private final List<LIST_TYPE> EMPTY_LIST = new ArrayList<LIST_TYPE>();
+ private final List<LIST_TYPE> EMPTY_LIST = new ArrayList<>();
public ConcurrentListMap() {
- data = new HashMap<MAP_TYPE, List<LIST_TYPE>>();
+ data = new HashMap<>();
}
public synchronized boolean add(MAP_TYPE key, LIST_TYPE value) {
List<LIST_TYPE> values = data.get(key);
if (values == null) {
- values = new CopyOnWriteArrayList<LIST_TYPE>();
+ values = new CopyOnWriteArrayList<>();
data.put(key, values);
}
if (values.contains(value)) {
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java
index d61c763ddb..77b26d9897 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java
@@ -23,7 +23,7 @@ public class EndpointReceiveCollection {
private final List<EndpointReceive> receivers;
public EndpointReceiveCollection() {
- receivers = new CopyOnWriteArrayList<EndpointReceive>();
+ receivers = new CopyOnWriteArrayList<>();
}
public synchronized boolean add(EndpointReceive endpoint) {
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java
index 6366dbe9e4..ff705c62f8 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java
@@ -31,9 +31,9 @@ public class EndpointSendCollection {
private final Map<MessageId, ProtocolId> messageIdMapping;
public EndpointSendCollection() {
- endpoints = new CopyOnWriteArrayList<EndpointSend>();
- protocolMapping = new ConcurrentHashMap<ProtocolId, EndpointSend>();
- messageIdMapping = new ConcurrentHashMap<MessageId, ProtocolId>();
+ endpoints = new CopyOnWriteArrayList<>();
+ protocolMapping = new ConcurrentHashMap<>();
+ messageIdMapping = new ConcurrentHashMap<>();
}
public synchronized boolean add(EndpointSend endpoint) {
@@ -46,7 +46,7 @@ public class EndpointSendCollection {
public synchronized boolean remove(EndpointSend endpoint) {
if (endpoints.remove(endpoint)) {
- List<ProtocolId> protocolIdsToRemove = new ArrayList<ProtocolId>();
+ List<ProtocolId> protocolIdsToRemove = new ArrayList<>();
Iterator<ProtocolId> it = protocolMapping.keySet().iterator();
while (it.hasNext()) {
ProtocolId id = it.next();
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java
index fcd5d447a4..9fc98f6c51 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java
@@ -24,8 +24,8 @@ public class MessageListenerCollection {
private final ConcurrentListMap<MessageId, SendListener> sendListeners;
public MessageListenerCollection() {
- receiveListeners = new ConcurrentListMap<MessageId, ReceiveListener>();
- sendListeners = new ConcurrentListMap<MessageId, SendListener>();
+ receiveListeners = new ConcurrentListMap<>();
+ sendListeners = new ConcurrentListMap<>();
}
public boolean addReceiveListener(MessageId messageId, ReceiveListener receiveListener) {

Back to the top