activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [1/2] activemq-artemis git commit: Remove redundant type arguments
Date Mon, 16 May 2016 09:43:53 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0e0dec664 -> 9a9968c35


Remove redundant type arguments


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/09a0b98d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/09a0b98d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/09a0b98d

Branch: refs/heads/master
Commit: 09a0b98d244cf413329e5417e15f73d002407be1
Parents: 0e0dec6
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Fri May 13 21:56:04 2016 +0300
Committer: Ville Skyttä <ville.skytta@iki.fi>
Committed: Fri May 13 21:56:04 2016 +0300

----------------------------------------------------------------------
 .../org/apache/activemq/broker/BrokerService.java |  2 +-
 .../apache/activemq/JmsQueueTransactionTest.java  |  2 +-
 .../activemq/JmsTransactionTestSupport.java       | 18 +++++++++---------
 .../failover/ConnectionHangOnStartupTest.java     |  2 +-
 .../transport/failover/FailoverClusterTest.java   |  4 ++--
 .../failover/FailoverComplexClusterTest.java      | 12 ++++++------
 .../FailoverConsumerOutstandingCommitTest.java    |  2 +-
 .../failover/FailoverConsumerUnconsumedTest.java  |  2 +-
 .../transport/failover/FailoverPriorityTest.java  |  4 ++--
 .../transport/failover/FailoverRandomTest.java    |  2 +-
 .../failover/FailoverTransportBrokerTest.java     |  2 +-
 .../failover/FailoverUpdateURIsTest.java          |  2 +-
 .../failover/TwoBrokerFailoverClusterTest.java    |  6 +++---
 .../fanout/FanoutTransportBrokerTest.java         |  2 +-
 .../org/apache/activemq/util/SocketProxy.java     | 10 +++++-----
 15 files changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/BrokerService.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/BrokerService.java
b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/BrokerService.java
index 7da162d..69724c7 100644
--- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/BrokerService.java
+++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/BrokerService.java
@@ -104,7 +104,7 @@ public class BrokerService implements Service {
    private PolicyMap destinationPolicy;
    private SystemUsage systemUsage;
 
-   private final List<NetworkConnector> networkConnectors = new CopyOnWriteArrayList<NetworkConnector>();
+   private final List<NetworkConnector> networkConnectors = new CopyOnWriteArrayList<>();
 
    private TemporaryFolder tmpfolder;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
index e74bc0f..e464b7c 100755
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
@@ -70,7 +70,7 @@ public class JmsQueueTransactionTest extends JmsTransactionTestSupport {
         LOG.info("Sent 0: " + outbound[0]);
         LOG.info("Sent 1: " + outbound[1]);
 
-        ArrayList<Message> messages = new ArrayList<Message>();
+        ArrayList<Message> messages = new ArrayList<>();
         beginTx();
         Message message = consumer.receive(2000);
         assertEquals(outbound[0], message);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
index abaf52d..0ced1cd 100755
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
@@ -61,8 +61,8 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
     protected BrokerService broker;
 
     // for message listener test
-    private final List<Message> unackMessages = new ArrayList<Message>(MESSAGE_COUNT);
-    private final List<Message> ackMessages = new ArrayList<Message>(MESSAGE_COUNT);
+    private final List<Message> unackMessages = new ArrayList<>(MESSAGE_COUNT);
+    private final List<Message> ackMessages = new ArrayList<>(MESSAGE_COUNT);
     private boolean resendPhase;
 
     public JmsTransactionTestSupport() {
@@ -208,7 +208,7 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
 
         // receives the first message
         beginTx();
-        ArrayList<Message> messages = new ArrayList<Message>();
+        ArrayList<Message> messages = new ArrayList<>();
         LOG.info("About to consume message 1");
         Message message = consumer.receive(1000);
         messages.add(message);
@@ -243,7 +243,7 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
 
         // receives the first message
         beginTx();
-        ArrayList<Message> messages = new ArrayList<Message>();
+        ArrayList<Message> messages = new ArrayList<>();
         LOG.info("About to consume message 1");
         Message message = consumer.receive(1000);
         messages.add(message);
@@ -283,7 +283,7 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
         commitTx();
 
         // receives the first message
-        ArrayList<Message> messages = new ArrayList<Message>();
+        ArrayList<Message> messages = new ArrayList<>();
         LOG.info("About to consume message 1");
         beginTx();
         Message message = consumer.receive(1000);
@@ -331,7 +331,7 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
         commitTx();
 
         // receives the first message
-        ArrayList<Message> messages = new ArrayList<Message>();
+        ArrayList<Message> messages = new ArrayList<>();
         LOG.info("About to consume message 1");
         beginTx();
         Message message = consumer.receive(1000);
@@ -375,7 +375,7 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
         LOG.info("Sent 0: " + outbound[0]);
         LOG.info("Sent 1: " + outbound[1]);
 
-        ArrayList<Message> messages = new ArrayList<Message>();
+        ArrayList<Message> messages = new ArrayList<>();
         beginTx();
         Message message = consumer.receive(1000);
         messages.add(message);
@@ -426,7 +426,7 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
         LOG.info("Sent 0: " + outbound[0]);
         LOG.info("Sent 1: " + outbound[1]);
 
-        ArrayList<Message> messages = new ArrayList<Message>();
+        ArrayList<Message> messages = new ArrayList<>();
         beginTx();
         Message message = consumer.receive(1000);
         assertEquals(outbound[0], message);
@@ -566,7 +566,7 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements
M
     }
 
     public void testChangeMutableObjectInObjectMessageThenRollback() throws Exception {
-        ArrayList<String> list = new ArrayList<String>();
+        ArrayList<String> list = new ArrayList<>();
         list.add("First");
         Message outbound = session.createObjectMessage(list);
         outbound.setStringProperty("foo", "abc");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ConnectionHangOnStartupTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ConnectionHangOnStartupTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ConnectionHangOnStartupTest.java
index 99e22b4..08d456c 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ConnectionHangOnStartupTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ConnectionHangOnStartupTest.java
@@ -44,7 +44,7 @@ public class ConnectionHangOnStartupTest extends OpenwireArtemisBaseTest
{
    // connection sooner)
    protected String uriString = "failover://(tcp://localhost:62001?wireFormat.maxInactivityDurationInitalDelay=1,tcp://localhost:62002?wireFormat.maxInactivityDurationInitalDelay=1)?randomize=false&maxReconnectDelay=200";
    protected EmbeddedJMS master = null;
-   protected AtomicReference<EmbeddedJMS> slave = new AtomicReference<EmbeddedJMS>();
+   protected AtomicReference<EmbeddedJMS> slave = new AtomicReference<>();
 
    @After
    public void tearDown() throws Exception {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java
index 74fa6aa..9e19b90 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java
@@ -52,7 +52,7 @@ public class FailoverClusterTest extends OpenwireArtemisBaseTest {
 
    @Before
    public void setUp() throws Exception {
-      Map<String, String> params = new HashMap<String, String>();
+      Map<String, String> params = new HashMap<>();
 
       params.put("rebalanceClusterClients", "true");
       params.put("updateClusterClients", "true");
@@ -110,7 +110,7 @@ public class FailoverClusterTest extends OpenwireArtemisBaseTest {
 
       Thread.sleep(3000);
 
-      Set<String> set = new HashSet<String>();
+      Set<String> set = new HashSet<>();
       for (ActiveMQConnection c : connections) {
          set.add(c.getTransportChannel().getRemoteAddress());
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverComplexClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverComplexClusterTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverComplexClusterTest.java
index fd9ce1f..66cb09a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverComplexClusterTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverComplexClusterTest.java
@@ -56,7 +56,7 @@ public class FailoverComplexClusterTest extends OpenwireArtemisBaseTest
{
    private EmbeddedJMS[] servers = new EmbeddedJMS[3];
 
    private static final int NUMBER_OF_CLIENTS = 30;
-   private final List<ActiveMQConnection> connections = new ArrayList<ActiveMQConnection>();
+   private final List<ActiveMQConnection> connections = new ArrayList<>();
 
 
    @Before
@@ -65,7 +65,7 @@ public class FailoverComplexClusterTest extends OpenwireArtemisBaseTest
{
 
    //default setup for most tests
    private void commonSetup() throws Exception {
-      Map<String, String> params = new HashMap<String, String>();
+      Map<String, String> params = new HashMap<>();
 
       params.put("rebalanceClusterClients", "true");
       params.put("updateClusterClients", "true");
@@ -349,7 +349,7 @@ public class FailoverComplexClusterTest extends OpenwireArtemisBaseTest
{
    }
 
    protected void assertClientsConnectedToThreeBrokers() {
-      Set<String> set = new HashSet<String>();
+      Set<String> set = new HashSet<>();
       for (ActiveMQConnection c : connections) {
          if (c.getTransportChannel().getRemoteAddress() != null) {
             set.add(c.getTransportChannel().getRemoteAddress());
@@ -359,7 +359,7 @@ public class FailoverComplexClusterTest extends OpenwireArtemisBaseTest
{
    }
 
    protected void assertClientsConnectedToTwoBrokers() {
-      Set<String> set = new HashSet<String>();
+      Set<String> set = new HashSet<>();
       for (ActiveMQConnection c : connections) {
          if (c.getTransportChannel().getRemoteAddress() != null) {
             set.add(c.getTransportChannel().getRemoteAddress());
@@ -415,7 +415,7 @@ public class FailoverComplexClusterTest extends OpenwireArtemisBaseTest
{
    }
 
    protected void assertClientsConnectionsEvenlyDistributed(double minimumPercentage, double
maximumPercentage) {
-      Map<String, Double> clientConnectionCounts = new HashMap<String, Double>();
+      Map<String, Double> clientConnectionCounts = new HashMap<>();
       int total = 0;
       for (ActiveMQConnection c : connections) {
          String key = c.getTransportChannel().getRemoteAddress();
@@ -432,7 +432,7 @@ public class FailoverComplexClusterTest extends OpenwireArtemisBaseTest
{
          }
       }
       Set<String> keys = clientConnectionCounts.keySet();
-      List<String> errorMsgs = new ArrayList<String>();
+      List<String> errorMsgs = new ArrayList<>();
       for (String key : keys) {
          double count = clientConnectionCounts.get(key);
          double percentage = count / total;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
index 09af25e..449600a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
@@ -228,7 +228,7 @@ public class FailoverConsumerOutstandingCommitTest extends OpenwireArtemisBaseTe
       final CountDownLatch commitDoneLatch = new CountDownLatch(1);
       final CountDownLatch messagesReceived = new CountDownLatch(3);
       final AtomicBoolean gotCommitException = new AtomicBoolean(false);
-      final ArrayList<TextMessage> receivedMessages = new ArrayList<TextMessage>();
+      final ArrayList<TextMessage> receivedMessages = new ArrayList<>();
       final MessageConsumer testConsumer = consumerSession.createConsumer(destination);
       doByteman.set(true);
       testConsumer.setMessageListener(new MessageListener() {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
index b0ee7ba..f51885b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
@@ -149,7 +149,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest
{
 
       doByteman.set(true);
 
-      final Vector<TestConsumer> testConsumers = new Vector<TestConsumer>();
+      final Vector<TestConsumer> testConsumers = new Vector<>();
       TestConsumer testConsumer = new TestConsumer(consumerSession, destination, connection);
       testConsumer.setMessageListener(new MessageListener() {
          @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPriorityTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPriorityTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPriorityTest.java
index 6f4b27e..dce42bc 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPriorityTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPriorityTest.java
@@ -47,10 +47,10 @@ public class FailoverPriorityTest extends OpenwireArtemisBaseTest {
    private static final String BROKER_C_CLIENT_TC_ADDRESS = "tcp://127.0.0.1:61618";
    private final HashMap<Integer, String> urls = new HashMap<>();
 
-   private final List<ActiveMQConnection> connections = new ArrayList<ActiveMQConnection>();
+   private final List<ActiveMQConnection> connections = new ArrayList<>();
    private EmbeddedJMS[] servers = new EmbeddedJMS[3];
    private String clientUrl;
-   private Map<String, String> params = new HashMap<String, String>();
+   private Map<String, String> params = new HashMap<>();
 
    @Before
    public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java
index d11bae5..8500cda 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java
@@ -38,7 +38,7 @@ public class FailoverRandomTest extends OpenwireArtemisBaseTest {
 
    @Before
    public void setUp() throws Exception {
-      Map<String, String> params = new HashMap<String, String>();
+      Map<String, String> params = new HashMap<>();
 
       params.put("rebalanceClusterClients", "true");
       params.put("updateClusterClients", "true");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
index 15d28d3..fcd409e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
 public class FailoverTransportBrokerTest extends OpenwireArtemisBaseTest {
 
    private static final Logger LOG = LoggerFactory.getLogger(FailoverTransportBrokerTest.class);
-   protected ArrayList<StubConnection> connections = new ArrayList<StubConnection>();
+   protected ArrayList<StubConnection> connections = new ArrayList<>();
    protected long idGenerator;
    protected int msgIdGenerator;
    protected int maxWait = 10000;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java
index 0a127dd..ef0614f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java
@@ -119,7 +119,7 @@ public class FailoverUpdateURIsTest extends OpenwireArtemisBaseTest {
 
    @Test
    public void testAutoUpdateURIs() throws Exception {
-      Map<String, String> params = new HashMap<String, String>();
+      Map<String, String> params = new HashMap<>();
       params.put("updateClusterClients", "true");
       Configuration config0 = createConfig("localhost", 0, params);
       deployClusterConfiguration(config0, 10);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/TwoBrokerFailoverClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/TwoBrokerFailoverClusterTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/TwoBrokerFailoverClusterTest.java
index 5759547..9daa441 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/TwoBrokerFailoverClusterTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/TwoBrokerFailoverClusterTest.java
@@ -41,7 +41,7 @@ import java.util.concurrent.TimeUnit;
 public class TwoBrokerFailoverClusterTest extends OpenwireArtemisBaseTest {
 
    private static final int NUMBER_OF_CLIENTS = 30;
-   private final List<ActiveMQConnection> connections = new ArrayList<ActiveMQConnection>();
+   private final List<ActiveMQConnection> connections = new ArrayList<>();
    private EmbeddedJMS server0;
    private EmbeddedJMS server1;
    private String clientUrl;
@@ -126,7 +126,7 @@ public class TwoBrokerFailoverClusterTest extends OpenwireArtemisBaseTest
{
    }
 
    protected void assertClientsConnectedToTwoBrokers() {
-      Set<String> set = new HashSet<String>();
+      Set<String> set = new HashSet<>();
       for (ActiveMQConnection c : connections) {
          if (c.getTransportChannel().getRemoteAddress() != null) {
             set.add(c.getTransportChannel().getRemoteAddress());
@@ -136,7 +136,7 @@ public class TwoBrokerFailoverClusterTest extends OpenwireArtemisBaseTest
{
    }
 
    protected void assertClientsConnectionsEvenlyDistributed(double minimumPercentage) {
-      Map<String, Double> clientConnectionCounts = new HashMap<String, Double>();
+      Map<String, Double> clientConnectionCounts = new HashMap<>();
       int total = 0;
       for (ActiveMQConnection c : connections) {
          String key = c.getTransportChannel().getRemoteAddress();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
index 72cc3f7..38ada79 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
@@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory;
 public class FanoutTransportBrokerTest extends OpenwireArtemisBaseTest {
    public static final boolean FAST_NO_MESSAGE_LEFT_ASSERT = System.getProperty("FAST_NO_MESSAGE_LEFT_ASSERT",
"true").equals("true");
 
-   protected ArrayList<StubConnection> connections = new ArrayList<StubConnection>();
+   protected ArrayList<StubConnection> connections = new ArrayList<>();
    protected long idGenerator;
    protected int msgIdGenerator;
    protected int maxWait = 10000;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/09a0b98d/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
index ca9b42a..f6e3be3 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
@@ -52,7 +52,7 @@ public class SocketProxy {
 
     private CountDownLatch closed = new CountDownLatch(1);
 
-    public final List<Bridge> connections = new LinkedList<Bridge>();
+    public final List<Bridge> connections = new LinkedList<>();
 
     private int listenPort = 0;
 
@@ -131,7 +131,7 @@ public class SocketProxy {
     public void close() {
         List<Bridge> connections;
         synchronized(this.connections) {
-            connections = new ArrayList<Bridge>(this.connections);
+            connections = new ArrayList<>(this.connections);
         }
         LOG.info("close, numConnections=" + connections.size());
         for (Bridge con : connections) {
@@ -148,7 +148,7 @@ public class SocketProxy {
     public void halfClose() {
         List<Bridge> connections;
         synchronized(this.connections) {
-            connections = new ArrayList<Bridge>(this.connections);
+            connections = new ArrayList<>(this.connections);
         }
         LOG.info("halfClose, numConnections=" + connections.size());
         for (Bridge con : connections) {
@@ -288,7 +288,7 @@ public class SocketProxy {
 
             protected Socket src;
             private Socket destination;
-            private AtomicReference<CountDownLatch> pause = new AtomicReference<CountDownLatch>();
+            private AtomicReference<CountDownLatch> pause = new AtomicReference<>();
 
             public Pump(Socket source, Socket dest) {
                 super("SocketProxy-DataTransfer-" + source.getPort() + ":" + dest.getPort());
@@ -339,7 +339,7 @@ public class SocketProxy {
 
         private ServerSocket socket;
         private URI target;
-        private AtomicReference<CountDownLatch> pause = new AtomicReference<CountDownLatch>();
+        private AtomicReference<CountDownLatch> pause = new AtomicReference<>();
 
 
         public Acceptor(ServerSocket serverSocket, URI uri) {


Mime
View raw message