activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [16/32] activemq-artemis git commit: Remove redundant type arguments
Date Tue, 08 Dec 2015 00:12:42 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-server/src/test/java/org/apache/activemq/artemis/core/list/PriorityLinkedListTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/list/PriorityLinkedListTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/list/PriorityLinkedListTest.java
index 7dcf7a0..d464410 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/list/PriorityLinkedListTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/list/PriorityLinkedListTest.java
@@ -79,7 +79,7 @@ public final class PriorityLinkedListTest extends Assert {
    private PriorityLinkedListImpl<Wibble> list;
 
    protected PriorityLinkedListImpl<Wibble> getList() {
-      return new PriorityLinkedListImpl<Wibble>(10);
+      return new PriorityLinkedListImpl<>(10);
    }
 
    @Before

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/CertificateLoginModuleTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/CertificateLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/CertificateLoginModuleTest.java
index 24069dd..4488973 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/CertificateLoginModuleTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/CertificateLoginModuleTest.java
@@ -37,7 +37,7 @@ import org.junit.Test;
 public class CertificateLoginModuleTest extends Assert {
 
    private static final String USER_NAME = "testUser";
-   private static final List<String> ROLE_NAMES = new Vector<String>();
+   private static final List<String> ROLE_NAMES = new Vector<>();
 
    private StubCertificateLoginModule loginModule;
 
@@ -56,7 +56,7 @@ public class CertificateLoginModuleTest extends Assert {
    }
 
    private void loginWithCredentials(String userName, Set<String> rolesNames) throws LoginException {
-      loginModule = new StubCertificateLoginModule(userName, new HashSet<String>(rolesNames));
+      loginModule = new StubCertificateLoginModule(userName, new HashSet<>(rolesNames));
       JaasCallbackHandler callbackHandler = new JaasCallbackHandler(null, null, null);
 
       loginModule.initialize(subject, callbackHandler, null, new HashMap());
@@ -113,7 +113,7 @@ public class CertificateLoginModuleTest extends Assert {
    @Test
    public void testLoginSuccess() throws IOException {
       try {
-         loginWithCredentials(USER_NAME, new HashSet<String>(ROLE_NAMES));
+         loginWithCredentials(USER_NAME, new HashSet<>(ROLE_NAMES));
       }
       catch (Exception e) {
          fail("Unable to login: " + e.getMessage());
@@ -141,7 +141,7 @@ public class CertificateLoginModuleTest extends Assert {
    @Test
    public void testLogOut() throws IOException {
       try {
-         loginWithCredentials(USER_NAME, new HashSet<String>(ROLE_NAMES));
+         loginWithCredentials(USER_NAME, new HashSet<>(ROLE_NAMES));
       }
       catch (Exception e) {
          fail("Unable to login: " + e.getMessage());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleRaceConditionTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleRaceConditionTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleRaceConditionTest.java
index 13907f8..8b24306 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleRaceConditionTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleRaceConditionTest.java
@@ -93,7 +93,7 @@ public class PropertiesLoginModuleRaceConditionTest {
 
             Subject subject = new Subject();
             PropertiesLoginModule module = new PropertiesLoginModule();
-            module.initialize(subject, callback, new HashMap<Object, Object>(), options);
+            module.initialize(subject, callback, new HashMap<>(), options);
             module.login();
             module.commit();
          }
@@ -111,14 +111,14 @@ public class PropertiesLoginModuleRaceConditionTest {
       createUsers();
       createGroups();
 
-      options = new HashMap<String, String>();
+      options = new HashMap<>();
       options.put("reload", "true"); // Used to simplify reproduction of the
       // race condition
       options.put("org.apache.activemq.jaas.properties.user", USERS_FILE);
       options.put("org.apache.activemq.jaas.properties.role", ROLES_FILE);
       options.put("baseDir", temp.getRoot().getAbsolutePath());
 
-      errors = new ArrayBlockingQueue<Exception>(processorCount());
+      errors = new ArrayBlockingQueue<>(processorCount());
       pool = Executors.newFixedThreadPool(processorCount());
       callback = new JaasCallbackHandler(USERNAME, PASSWORD, null);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
index c309db0..3ccb311 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
@@ -102,7 +102,7 @@ public class ClusteredResetMockTest extends ActiveMQTestBase {
 
          assertTrue(latchSends.await(10, TimeUnit.SECONDS));
 
-         HashSet<SimpleString> codesAsked = new HashSet<SimpleString>();
+         HashSet<SimpleString> codesAsked = new HashSet<>();
 
          for (Notification notification : fake.pendingNotifications) {
             codesAsked.add(notification.getProperties().getSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID));
@@ -172,7 +172,7 @@ public class ClusteredResetMockTest extends ActiveMQTestBase {
 
    class FakeManagement implements ManagementService {
 
-      public ConcurrentHashSet<Notification> pendingNotifications = new ConcurrentHashSet<Notification>();
+      public ConcurrentHashSet<Notification> pendingNotifications = new ConcurrentHashSet<>();
 
       final ReusableLatch latch;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
index c6af9a7..562fbd1 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
@@ -259,7 +259,7 @@ public class ScheduledDeliveryHandlerTest extends Assert {
    private void debugList(boolean fail, ScheduledDeliveryHandlerImpl handler, long numberOfExpectedMessages) {
       List<MessageReference> refs = handler.getScheduledReferences();
 
-      HashSet<Long> messages = new HashSet<Long>();
+      HashSet<Long> messages = new HashSet<>();
 
       long lastTime = -1;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
index c738f04..06acede 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
@@ -71,11 +71,11 @@ public class RepositoryTest extends ActiveMQTestBase {
    @Test
    public void testSingletwo() {
       securityRepository.addMatch("queues.another.aq.*", new HashSet<Role>());
-      HashSet<Role> roles = new HashSet<Role>(2);
+      HashSet<Role> roles = new HashSet<>(2);
       roles.add(new Role("test1", true, true, true, true, true, true, true));
       roles.add(new Role("test2", true, true, true, true, true, true, true));
       securityRepository.addMatch("queues.aq", roles);
-      HashSet<Role> roles2 = new HashSet<Role>(2);
+      HashSet<Role> roles2 = new HashSet<>(2);
       roles2.add(new Role("test1", true, true, true, true, true, true, true));
       roles2.add(new Role("test2", true, true, true, true, true, true, true));
       roles2.add(new Role("test3", true, true, true, true, true, true, true));
@@ -88,7 +88,7 @@ public class RepositoryTest extends ActiveMQTestBase {
    @Test
    public void testWithoutWildcard() {
       securityRepository.addMatch("queues.1.*", new HashSet<Role>());
-      HashSet<Role> roles = new HashSet<Role>(2);
+      HashSet<Role> roles = new HashSet<>(2);
       roles.add(new Role("test1", true, true, true, true, true, true, true));
       roles.add(new Role("test2", true, true, true, true, true, true, true));
       securityRepository.addMatch("queues.2.aq", roles);
@@ -98,7 +98,7 @@ public class RepositoryTest extends ActiveMQTestBase {
 
    @Test
    public void testMultipleWildcards() {
-      HierarchicalRepository<String> repository = new HierarchicalObjectRepository<String>();
+      HierarchicalRepository<String> repository = new HierarchicalObjectRepository<>();
       repository.addMatch("#", "#");
       repository.addMatch("a", "a");
       repository.addMatch("a.#", "a.#");
@@ -142,7 +142,7 @@ public class RepositoryTest extends ActiveMQTestBase {
 
    @Test
    public void testRepositoryMerge() {
-      HierarchicalRepository<DummyMergeable> repository = new HierarchicalObjectRepository<DummyMergeable>();
+      HierarchicalRepository<DummyMergeable> repository = new HierarchicalObjectRepository<>();
       repository.addMatch("#", new DummyMergeable(1));
       repository.addMatch("a.#", new DummyMergeable(2));
       repository.addMatch("b.#", new DummyMergeable(3));
@@ -172,7 +172,7 @@ public class RepositoryTest extends ActiveMQTestBase {
 
    @Test
    public void testAddListener() {
-      HierarchicalRepository<String> repository = new HierarchicalObjectRepository<String>();
+      HierarchicalRepository<String> repository = new HierarchicalObjectRepository<>();
       repository.addMatch("#", "1");
       repository.addMatch("B", "2");
 
@@ -213,7 +213,7 @@ public class RepositoryTest extends ActiveMQTestBase {
 
    @Test
    public void testIllegalMatches() {
-      HierarchicalRepository<String> repository = new HierarchicalObjectRepository<String>();
+      HierarchicalRepository<String> repository = new HierarchicalObjectRepository<>();
       try {
          repository.addMatch("hjhjhjhjh.#.hhh", "test");
          fail("expected exception");
@@ -234,13 +234,13 @@ public class RepositoryTest extends ActiveMQTestBase {
 
       static int timesMerged = 0;
 
-      static ArrayList<Integer> merged = new ArrayList<Integer>();
+      static ArrayList<Integer> merged = new ArrayList<>();
 
       private final Integer id;
 
       static void reset() {
          DummyMergeable.timesMerged = 0;
-         DummyMergeable.merged = new ArrayList<Integer>();
+         DummyMergeable.merged = new ArrayList<>();
       }
 
       static boolean contains(final Integer i) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
index b8cd129..34f1ca9 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
@@ -161,16 +161,16 @@ public abstract class ActiveMQTestBase extends Assert {
    protected static final long WAIT_TIMEOUT = 30000;
 
    // There is a verification about thread leakages. We only fail a single thread when this happens
-   private static Set<Thread> alreadyFailedThread = new HashSet<Thread>();
+   private static Set<Thread> alreadyFailedThread = new HashSet<>();
 
-   private final Collection<ActiveMQServer> servers = new ArrayList<ActiveMQServer>();
-   private final Collection<ServerLocator> locators = new ArrayList<ServerLocator>();
-   private final Collection<ClientSessionFactory> sessionFactories = new ArrayList<ClientSessionFactory>();
-   private final Collection<ClientSession> clientSessions = new HashSet<ClientSession>();
-   private final Collection<ClientConsumer> clientConsumers = new HashSet<ClientConsumer>();
-   private final Collection<ClientProducer> clientProducers = new HashSet<ClientProducer>();
-   private final Collection<ActiveMQComponent> otherComponents = new HashSet<ActiveMQComponent>();
-   private final Set<ExecutorService> executorSet = new HashSet<ExecutorService>();
+   private final Collection<ActiveMQServer> servers = new ArrayList<>();
+   private final Collection<ServerLocator> locators = new ArrayList<>();
+   private final Collection<ClientSessionFactory> sessionFactories = new ArrayList<>();
+   private final Collection<ClientSession> clientSessions = new HashSet<>();
+   private final Collection<ClientConsumer> clientConsumers = new HashSet<>();
+   private final Collection<ClientProducer> clientProducers = new HashSet<>();
+   private final Collection<ActiveMQComponent> otherComponents = new HashSet<>();
+   private final Set<ExecutorService> executorSet = new HashSet<>();
 
    private boolean checkThread = true;
    private String testDir;
@@ -466,7 +466,7 @@ public abstract class ActiveMQTestBase extends Assert {
    }
 
    protected Map<String, Object> generateInVMParams(final int node) {
-      Map<String, Object> params = new HashMap<String, Object>();
+      Map<String, Object> params = new HashMap<>();
 
       params.put(org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, node);
 
@@ -547,7 +547,7 @@ public abstract class ActiveMQTestBase extends Assert {
       long waitUntil = System.currentTimeMillis() + timeout;
       // A loop that will wait GC, using the minimal time as possible
       while (ref.get() != null && System.currentTimeMillis() < waitUntil) {
-         ArrayList<String> list = new ArrayList<String>();
+         ArrayList<String> list = new ArrayList<>();
          for (int i = 0; i < 1000; i++) {
             list.add("Some string with garbage with concatenation " + i);
          }
@@ -750,7 +750,7 @@ public abstract class ActiveMQTestBase extends Assert {
       // The connectors need to be pre-configured at main config object but this method is taking
       // TransportConfigurations directly
       // So this will first register them at the config and then generate a list of objects
-      ArrayList<String> connectors = new ArrayList<String>();
+      ArrayList<String> connectors = new ArrayList<>();
       for (TransportConfiguration tnsp : connectorConfigs) {
          String name1 = RandomUtil.randomString();
 
@@ -1017,7 +1017,7 @@ public abstract class ActiveMQTestBase extends Assert {
     * You can pass a list of properties to be ignored, as some properties will have a pre-defined domain (not being possible to use random-values on them)
     */
    protected void validateGettersAndSetters(final Object pojo, final String... ignoredProperties) throws Exception {
-      HashSet<String> ignoreSet = new HashSet<String>();
+      HashSet<String> ignoreSet = new HashSet<>();
 
       for (String ignore : ignoredProperties) {
          ignoreSet.add(ignore);
@@ -1186,7 +1186,7 @@ public abstract class ActiveMQTestBase extends Assert {
    }
 
    protected static final Map<String, Object> generateParams(final int node, final boolean netty) {
-      Map<String, Object> params = new HashMap<String, Object>();
+      Map<String, Object> params = new HashMap<>();
 
       if (netty) {
          params.put(org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + node);
@@ -1203,7 +1203,7 @@ public abstract class ActiveMQTestBase extends Assert {
          return new TransportConfiguration(NETTY_ACCEPTOR_FACTORY);
       }
 
-      Map<String, Object> server1Params = new HashMap<String, Object>();
+      Map<String, Object> server1Params = new HashMap<>();
 
       server1Params.put(org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + 1);
 
@@ -1215,7 +1215,7 @@ public abstract class ActiveMQTestBase extends Assert {
          return new TransportConfiguration(NETTY_CONNECTOR_FACTORY);
       }
 
-      Map<String, Object> server1Params = new HashMap<String, Object>();
+      Map<String, Object> server1Params = new HashMap<>();
 
       server1Params.put(org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + 1);
       return new TransportConfiguration(NETTY_CONNECTOR_FACTORY, server1Params);
@@ -1242,7 +1242,7 @@ public abstract class ActiveMQTestBase extends Assert {
          }
       }
       if (params == null)
-         params = new HashMap<String, Object>();
+         params = new HashMap<>();
       return new TransportConfiguration(className, params);
    }
 
@@ -1531,7 +1531,7 @@ public abstract class ActiveMQTestBase extends Assert {
     * @return
     */
    protected final TransportConfiguration createInVMTransportConnectorConfig(final int serverID, String name1) {
-      Map<String, Object> server1Params = new HashMap<String, Object>();
+      Map<String, Object> server1Params = new HashMap<>();
 
       if (serverID != 0) {
          server1Params.put(TransportConstants.SERVER_ID_PROP_NAME, serverID);
@@ -1631,14 +1631,14 @@ public abstract class ActiveMQTestBase extends Assert {
          SequentialFileFactory messagesFF = new NIOSequentialFileFactory(new File(getJournalDir()), null, 1);
 
          messagesJournal = new JournalImpl(config.getJournalFileSize(), config.getJournalMinFiles(), 0, 0, messagesFF, "activemq-data", "amq", 1);
-         final List<RecordInfo> committedRecords = new LinkedList<RecordInfo>();
-         final List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>();
+         final List<RecordInfo> committedRecords = new LinkedList<>();
+         final List<PreparedTransactionInfo> preparedTransactions = new LinkedList<>();
 
          messagesJournal.start();
 
          messagesJournal.load(committedRecords, preparedTransactions, null, false);
 
-         return new Pair<List<RecordInfo>, List<PreparedTransactionInfo>>(committedRecords, preparedTransactions);
+         return new Pair<>(committedRecords, preparedTransactions);
       }
       finally {
          try {
@@ -1661,7 +1661,7 @@ public abstract class ActiveMQTestBase extends Assert {
     * @throws Exception
     */
    protected HashMap<Integer, AtomicInteger> countJournal(Configuration config) throws Exception {
-      final HashMap<Integer, AtomicInteger> recordsType = new HashMap<Integer, AtomicInteger>();
+      final HashMap<Integer, AtomicInteger> recordsType = new HashMap<>();
       SequentialFileFactory messagesFF = new NIOSequentialFileFactory(config.getJournalLocation(), null, 1);
 
       JournalImpl messagesJournal = new JournalImpl(config.getJournalFileSize(), config.getJournalMinFiles(), 0, 0, messagesFF, "activemq-data", "amq", 1);
@@ -1694,7 +1694,7 @@ public abstract class ActiveMQTestBase extends Assert {
     */
    protected HashMap<Integer, AtomicInteger> internalCountJournalLivingRecords(Configuration config,
                                                                                boolean messageJournal) throws Exception {
-      final HashMap<Integer, AtomicInteger> recordsType = new HashMap<Integer, AtomicInteger>();
+      final HashMap<Integer, AtomicInteger> recordsType = new HashMap<>();
       SequentialFileFactory ff;
 
       JournalImpl journal;
@@ -1709,8 +1709,8 @@ public abstract class ActiveMQTestBase extends Assert {
       }
       journal.start();
 
-      final List<RecordInfo> committedRecords = new LinkedList<RecordInfo>();
-      final List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>();
+      final List<RecordInfo> committedRecords = new LinkedList<>();
+      final List<PreparedTransactionInfo> preparedTransactions = new LinkedList<>();
 
       journal.load(committedRecords, preparedTransactions, null, false);
 
@@ -2251,7 +2251,7 @@ public abstract class ActiveMQTestBase extends Assert {
 
    private List<QueueBinding> getLocalQueueBindings(final PostOffice postOffice,
                                                     final String address) throws Exception {
-      ArrayList<QueueBinding> bindingsFound = new ArrayList<QueueBinding>();
+      ArrayList<QueueBinding> bindingsFound = new ArrayList<>();
 
       Bindings bindings = postOffice.getBindingsForAddress(new SimpleString(address));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
----------------------------------------------------------------------
diff --git a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
index 3b2b3e7..f22f295 100644
--- a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
+++ b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceRecovery.java
@@ -172,7 +172,7 @@ public class ActiveMQXAResourceRecovery {
          }
 
          // other tokens are for connector configurations
-         connectorParameters = new HashMap<String, Object>();
+         connectorParameters = new HashMap<>();
          if (strings.length >= 3) {
             for (int i = 3; i < strings.length; i++) {
                String[] str = strings[i].split("=");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/artemis-service-extensions/src/test/java/org/apache/activemq/artemis/service/extensions/tests/xa/ActiveMQXAResourceWrapperImplTest.java
----------------------------------------------------------------------
diff --git a/artemis-service-extensions/src/test/java/org/apache/activemq/artemis/service/extensions/tests/xa/ActiveMQXAResourceWrapperImplTest.java b/artemis-service-extensions/src/test/java/org/apache/activemq/artemis/service/extensions/tests/xa/ActiveMQXAResourceWrapperImplTest.java
index eff8533..3d7f37e 100644
--- a/artemis-service-extensions/src/test/java/org/apache/activemq/artemis/service/extensions/tests/xa/ActiveMQXAResourceWrapperImplTest.java
+++ b/artemis-service-extensions/src/test/java/org/apache/activemq/artemis/service/extensions/tests/xa/ActiveMQXAResourceWrapperImplTest.java
@@ -35,7 +35,7 @@ public class ActiveMQXAResourceWrapperImplTest {
       String nodeId = "0";
       XAResource xaResource = new MockXAResource();
 
-      Map<String, Object> xaResourceWrapperProperties = new HashMap<String, Object>();
+      Map<String, Object> xaResourceWrapperProperties = new HashMap<>();
       xaResourceWrapperProperties.put(ActiveMQXAResourceWrapper.ACTIVEMQ_JNDI_NAME, jndiName);
       xaResourceWrapperProperties.put(ActiveMQXAResourceWrapper.ACTIVEMQ_NODE_ID, nodeId);
       xaResourceWrapperProperties.put(ActiveMQXAResourceWrapper.ACTIVEMQ_PRODUCT_VERSION, "6");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/clustered/clustered-jgroups/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredJgroupsExample.java
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-jgroups/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredJgroupsExample.java b/examples/features/clustered/clustered-jgroups/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredJgroupsExample.java
index f8016b1..5f956b5 100644
--- a/examples/features/clustered/clustered-jgroups/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredJgroupsExample.java
+++ b/examples/features/clustered/clustered-jgroups/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredJgroupsExample.java
@@ -42,7 +42,7 @@ public class ClusteredJgroupsExample {
 
       try {
          // Step 1. Get an initial context for looking up JNDI from server 0
-         Hashtable<String, Object> properties = new Hashtable<String, Object>();
+         Hashtable<String, Object> properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61616");
          properties.put("queue.queue/exampleQueue", "exampleQueue");
@@ -55,7 +55,7 @@ public class ClusteredJgroupsExample {
          ConnectionFactory cf0 = (ConnectionFactory) ic0.lookup("ConnectionFactory");
 
          // Step 4. Get an initial context for looking up JNDI from server 1
-         properties = new Hashtable<String, Object>();
+         properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61617");
          ic1 = new InitialContext(properties);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java b/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
index 08683ab..ee592f9 100644
--- a/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
+++ b/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
@@ -54,12 +54,12 @@ public class ColocatedFailoverScaleDownExample {
          Thread.sleep(3000);
 
          // Step 1. Get an initial context for looking up JNDI for both servers
-         Hashtable<String, Object> properties = new Hashtable<String, Object>();
+         Hashtable<String, Object> properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61617");
          initialContext1 = new InitialContext(properties);
 
-         properties = new Hashtable<String, Object>();
+         properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          properties.put("queue.queue/exampleQueue", "exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java b/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
index ac88238..5bf32f5 100644
--- a/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
+++ b/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
@@ -53,13 +53,13 @@ public class ColocatedFailoverExample {
          Thread.sleep(3000);
 
          // Step 1. Get an initial context for looking up JNDI for both servers
-         Hashtable<String, Object> properties = new Hashtable<String, Object>();
+         Hashtable<String, Object> properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          initialContext = new InitialContext(properties);
 
-         properties = new Hashtable<String, Object>();
+         properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61617");
          initialContext1 = new InitialContext(properties);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/ha/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
----------------------------------------------------------------------
diff --git a/examples/features/ha/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java b/examples/features/ha/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
index 0df8bfd..0401617 100644
--- a/examples/features/ha/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
+++ b/examples/features/ha/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
@@ -136,7 +136,7 @@ public class HAPolicyAutoBackupExample {
    private static void waitForBackups(ConnectionFactory cf0, int backups) throws InterruptedException {
       final CountDownLatch latch = new CountDownLatch(backups);
       ((ActiveMQConnectionFactory) cf0).getServerLocator().addClusterTopologyListener(new ClusterTopologyListener() {
-         List<TransportConfiguration> backups = new ArrayList<TransportConfiguration>();
+         List<TransportConfiguration> backups = new ArrayList<>();
 
          @Override
          public void nodeUP(TopologyMember member, boolean last) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/ha/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/features/ha/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java b/examples/features/ha/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
index 3d81a38..4383b28 100644
--- a/examples/features/ha/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
+++ b/examples/features/ha/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
@@ -51,13 +51,13 @@ public class ScaleDownExample {
          server1 = ServerUtil.startServer(args[1], ScaleDownExample.class.getSimpleName() + "1", 1, 5000);
 
          // Step 1. Get an initial context for looking up JNDI for both servers
-         Hashtable<String, Object> properties = new Hashtable<String, Object>();
+         Hashtable<String, Object> properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          initialContext = new InitialContext(properties);
 
-         properties = new Hashtable<String, Object>();
+         properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61617?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          initialContext1 = new InitialContext(properties);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java b/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java
index 0fa17c2..4c0e3b9 100644
--- a/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java
+++ b/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java
@@ -44,7 +44,7 @@ public class BridgeExample {
       try {
          // Step 1 - we create an initial context for looking up JNDI on node 0
 
-         Hashtable<String, Object> properties = new Hashtable<String, Object>();
+         Hashtable<String, Object> properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:61616");
          properties.put("queue.queue/sausage-factory", "sausage-factory");
@@ -60,7 +60,7 @@ public class BridgeExample {
 
          // Step 4 - we create an initial context for looking up JNDI on node 1
 
-         properties = new Hashtable<String, Object>();
+         properties = new Hashtable<>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:61617");
          properties.put("queue.queue/mincing-machine", "mincing-machine");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java b/examples/features/standard/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java
index 14e9f37..bf70e96 100644
--- a/examples/features/standard/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java
+++ b/examples/features/standard/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java
@@ -54,7 +54,7 @@ public class ClientKickoffExample {
          connection = cf.createQueueConnection();
 
          // Step 4. Set an exception listener on the connection to be notified after a problem occurred
-         final AtomicReference<JMSException> exception = new AtomicReference<JMSException>();
+         final AtomicReference<JMSException> exception = new AtomicReference<>();
          connection.setExceptionListener(new ExceptionListener() {
             @Override
             public void onException(final JMSException e) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/embedded-simple/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/embedded-simple/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java b/examples/features/standard/embedded-simple/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
index 334c58f..526f870 100644
--- a/examples/features/standard/embedded-simple/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
+++ b/examples/features/standard/embedded-simple/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
@@ -53,7 +53,7 @@ public class EmbeddedExample {
       System.out.println("Started Embedded JMS Server");
 
       JMSServerManager jmsServerManager = jmsServer.getJMSServerManager();
-      List<String> connectors = new ArrayList<String>();
+      List<String> connectors = new ArrayList<>();
       connectors.add("in-vm");
       jmsServerManager.createConnectionFactory("ConnectionFactory", false, JMSFactoryType.CF, connectors, "ConnectionFactory");
       jmsServerManager.createQueue(false, "exampleQueue", null, false, "queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java b/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
index cb39fd0..9cdc504 100644
--- a/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
+++ b/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
@@ -60,7 +60,7 @@ public final class EmbeddedExample {
       JMSConfiguration jmsConfig = new JMSConfigurationImpl();
 
       // Step 3. Configure the JMS ConnectionFactory
-      ArrayList<String> connectorNames = new ArrayList<String>();
+      ArrayList<String> connectorNames = new ArrayList<>();
       connectorNames.add("connector");
       ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl().setName("cf").setConnectorNames(connectorNames).setBindings("cf");
       jmsConfig.getConnectionFactoryConfigurations().add(cfConfig);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/jms-bridge/src/main/java/org/apache/activemq/artemis/jms/example/JMSBridgeExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-bridge/src/main/java/org/apache/activemq/artemis/jms/example/JMSBridgeExample.java b/examples/features/standard/jms-bridge/src/main/java/org/apache/activemq/artemis/jms/example/JMSBridgeExample.java
index 8a65cd5..f15db57 100644
--- a/examples/features/standard/jms-bridge/src/main/java/org/apache/activemq/artemis/jms/example/JMSBridgeExample.java
+++ b/examples/features/standard/jms-bridge/src/main/java/org/apache/activemq/artemis/jms/example/JMSBridgeExample.java
@@ -126,7 +126,7 @@ public class JMSBridgeExample {
    }
 
    private static Hashtable<String, String> createJndiParams(String server) {
-      Hashtable<String, String> jndiProps = new Hashtable<String, String>();
+      Hashtable<String, String> jndiProps = new Hashtable<>();
       jndiProps.put("connectionFactory.ConnectionFactory", server);
       jndiProps.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       jndiProps.put("queue.target/queue", "target");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java b/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
index 88b75e4..4db7618 100644
--- a/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
+++ b/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
@@ -37,7 +37,7 @@ import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 public class MessageGroupExample {
 
    public static void main(final String[] args) throws Exception {
-      final Map<String, String> messageReceiverMap = new ConcurrentHashMap<String, String>();
+      final Map<String, String> messageReceiverMap = new ConcurrentHashMap<>();
       Connection connection = null;
       try {
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java b/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
index db104f7..717c454 100644
--- a/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
+++ b/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
@@ -39,7 +39,7 @@ public class MessageGroup2Example {
    private boolean result = true;
 
    public static void main(String[] args) throws Exception {
-      final Map<String, String> messageReceiverMap = new ConcurrentHashMap<String, String>();
+      final Map<String, String> messageReceiverMap = new ConcurrentHashMap<>();
       Connection connection = null;
       try {
          //Step 2. Perform a lookup on the queue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java b/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
index b9257c0..b879615 100644
--- a/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
+++ b/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
@@ -41,7 +41,7 @@ public class MessagePriorityExample {
 
    public static void main(final String[] args) throws Exception {
       AtomicBoolean result = new AtomicBoolean(true);
-      final ArrayList<TextMessage> msgReceived = new ArrayList<TextMessage>();
+      final ArrayList<TextMessage> msgReceived = new ArrayList<>();
       Connection connection = null;
       try {
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java b/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java
index afdd738..edab71c 100644
--- a/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java
+++ b/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java
@@ -44,7 +44,7 @@ import javax.naming.InitialContext;
 public class RequestReplyExample {
 
    public static void main(final String[] args) throws Exception {
-      final Map<String, TextMessage> requestMap = new HashMap<String, TextMessage>();
+      final Map<String, TextMessage> requestMap = new HashMap<>();
       Connection connection = null;
       InitialContext initialContext = null;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
index f6f8b9c..1299f8e 100644
--- a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
+++ b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
@@ -51,7 +51,7 @@ public class XAHeuristicExample {
 
    public static void main(final String[] args) throws Exception {
       Boolean result = true;
-      final ArrayList<String> receiveHolder = new ArrayList<String>();
+      final ArrayList<String> receiveHolder = new ArrayList<>();
       XAConnection connection = null;
       InitialContext initialContext = null;
       try {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java b/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java
index 9835f54..53fed86 100644
--- a/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java
+++ b/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java
@@ -43,7 +43,7 @@ public class XASendExample {
 
    public static void main(final String[] args) throws Exception {
       AtomicBoolean result = new AtomicBoolean(true);
-      final ArrayList<String> receiveHolder = new ArrayList<String>();
+      final ArrayList<String> receiveHolder = new ArrayList<>();
       XAConnection connection = null;
       InitialContext initialContext = null;
       try {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/artemis/integration/vertx/VertxConstants.java
----------------------------------------------------------------------
diff --git a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/artemis/integration/vertx/VertxConstants.java b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/artemis/integration/vertx/VertxConstants.java
index 209dda5..e0d1537 100644
--- a/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/artemis/integration/vertx/VertxConstants.java
+++ b/integration/activemq-vertx-integration/src/main/java/org/apache/activemq/artemis/integration/vertx/VertxConstants.java
@@ -56,7 +56,7 @@ public class VertxConstants {
    public static final String VERTX_MESSAGE_TYPE = "VertxMessageType";
 
    static {
-      ALLOWABLE_INCOMING_CONNECTOR_KEYS = new HashSet<String>();
+      ALLOWABLE_INCOMING_CONNECTOR_KEYS = new HashSet<>();
       ALLOWABLE_INCOMING_CONNECTOR_KEYS.add(PORT);
       ALLOWABLE_INCOMING_CONNECTOR_KEYS.add(HOST);
       ALLOWABLE_INCOMING_CONNECTOR_KEYS.add(QUEUE_NAME);
@@ -64,10 +64,10 @@ public class VertxConstants {
       ALLOWABLE_INCOMING_CONNECTOR_KEYS.add(VERTX_QUORUM_SIZE);
       ALLOWABLE_INCOMING_CONNECTOR_KEYS.add(VERTX_HA_GROUP);
 
-      REQUIRED_INCOMING_CONNECTOR_KEYS = new HashSet<String>();
+      REQUIRED_INCOMING_CONNECTOR_KEYS = new HashSet<>();
       REQUIRED_INCOMING_CONNECTOR_KEYS.add(QUEUE_NAME);
 
-      ALLOWABLE_OUTGOING_CONNECTOR_KEYS = new HashSet<String>();
+      ALLOWABLE_OUTGOING_CONNECTOR_KEYS = new HashSet<>();
       ALLOWABLE_OUTGOING_CONNECTOR_KEYS.add(PORT);
       ALLOWABLE_OUTGOING_CONNECTOR_KEYS.add(HOST);
       ALLOWABLE_OUTGOING_CONNECTOR_KEYS.add(QUEUE_NAME);
@@ -76,7 +76,7 @@ public class VertxConstants {
       ALLOWABLE_OUTGOING_CONNECTOR_KEYS.add(VERTX_QUORUM_SIZE);
       ALLOWABLE_OUTGOING_CONNECTOR_KEYS.add(VERTX_HA_GROUP);
 
-      REQUIRED_OUTGOING_CONNECTOR_KEYS = new HashSet<String>();
+      REQUIRED_OUTGOING_CONNECTOR_KEYS = new HashSet<>();
       REQUIRED_OUTGOING_CONNECTOR_KEYS.add(QUEUE_NAME);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
index e6d835e..02e5c62 100644
--- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
+++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
@@ -250,7 +250,7 @@ public class ActiveMQConnectionFactory extends JNDIBaseStorable implements Conne
             Map<String, String> params = URISupport.parseParameters(uri);
             //EMPTY_MAP is immutable, so use a normal map instead.
             if (params == Collections.EMPTY_MAP) {
-               params = new HashMap<String, String>();
+               params = new HashMap<>();
             }
             params.put("invmBrokerId", uri.getHost() == null ? "localhost" : uri.getHost());
             defaultTcpUri = URISupport.createRemainingURI(defaultTcpUri, params);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/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 e50fdf8..ffdfc6e 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
@@ -91,9 +91,9 @@ public class BrokerService implements Service {
    private BrokerId brokerId;
    private Throwable startException = null;
    private boolean startAsync = false;
-   public Set<Integer> extraConnectors = new HashSet<Integer>();
+   public Set<Integer> extraConnectors = new HashSet<>();
 
-   private List<TransportConnector> transportConnectors = new ArrayList<TransportConnector>();
+   private List<TransportConnector> transportConnectors = new ArrayList<>();
    private File dataDirectoryFile;
 
    private PolicyMap destinationPolicy;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/ArtemisBrokerWrapper.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/ArtemisBrokerWrapper.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/ArtemisBrokerWrapper.java
index 14b93c6..61d6250 100644
--- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/ArtemisBrokerWrapper.java
+++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/ArtemisBrokerWrapper.java
@@ -43,7 +43,7 @@ import org.apache.activemq.broker.region.policy.PolicyMap;
 
 public class ArtemisBrokerWrapper extends ArtemisBrokerBase {
 
-   protected final Map<String, SimpleString> testQueues = new HashMap<String, SimpleString>();
+   protected final Map<String, SimpleString> testQueues = new HashMap<>();
    protected JMSServerManagerImpl jmsServer;
 
    public ArtemisBrokerWrapper(BrokerService brokerService) {
@@ -56,7 +56,7 @@ public class ArtemisBrokerWrapper extends ArtemisBrokerBase {
       clearDataRecreateServerDirs();
       server = createServer(realStore, true);
       server.getConfiguration().getAcceptorConfigurations().clear();
-      HashMap<String, Object> params = new HashMap<String, Object>();
+      HashMap<String, Object> params = new HashMap<>();
       params.put(TransportConstants.PORT_PROP_NAME, "61616");
       params.put(TransportConstants.PROTOCOLS_PROP_NAME, "OPENWIRE,CORE");
       TransportConfiguration transportConfiguration = new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, params);
@@ -84,7 +84,7 @@ public class ArtemisBrokerWrapper extends ArtemisBrokerBase {
 
       serverConfig.getAcceptorConfigurations().add(transportConfiguration);
       if (this.bservice.enableSsl()) {
-         params = new HashMap<String, Object>();
+         params = new HashMap<>();
          params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
          params.put(TransportConstants.PORT_PROP_NAME, 61611);
          params.put(TransportConstants.PROTOCOLS_PROP_NAME, "OPENWIRE");
@@ -104,7 +104,7 @@ public class ArtemisBrokerWrapper extends ArtemisBrokerBase {
       for (Integer port : bservice.extraConnectors) {
          if (port.intValue() != 61616) {
             //extra port
-            params = new HashMap<String, Object>();
+            params = new HashMap<>();
             params.put(TransportConstants.PORT_PROP_NAME, port.intValue());
             params.put(TransportConstants.PROTOCOLS_PROP_NAME, "OPENWIRE");
             TransportConfiguration extraTransportConfiguration = new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, params);
@@ -143,12 +143,12 @@ public class ArtemisBrokerWrapper extends ArtemisBrokerBase {
 
          Map<String, Set<Role>> settings = server.getConfiguration().getSecurityRoles();
          if (settings == null) {
-            settings = new HashMap<String, Set<Role>>();
+            settings = new HashMap<>();
             server.getConfiguration().setSecurityRoles(settings);
          }
          Set<Role> anySet = settings.get("#");
          if (anySet == null) {
-            anySet = new HashSet<Role>();
+            anySet = new HashSet<>();
             settings.put("#", anySet);
          }
          anySet.add(senderRole);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java
index f77a413..27b9f72 100644
--- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java
+++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java
@@ -175,13 +175,13 @@ public class InVMNamingContext implements Context, Serializable {
          }
       }
 
-      List<Binding> l = new ArrayList<Binding>();
+      List<Binding> l = new ArrayList<>();
       for (Object element : map.keySet()) {
          String name = (String) element;
          Object object = map.get(name);
          l.add(new Binding(name, object));
       }
-      return new NamingEnumerationImpl<Binding>(l.iterator());
+      return new NamingEnumerationImpl<>(l.iterator());
    }
 
    @Override
@@ -252,7 +252,7 @@ public class InVMNamingContext implements Context, Serializable {
 
    @Override
    public Hashtable<String, String> getEnvironment() throws NamingException {
-      Hashtable<String, String> env = new Hashtable<String, String>();
+      Hashtable<String, String> env = new Hashtable<>();
       env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jms.tests.tools.container.InVMInitialContextFactory");
       return env;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
index 58d51ca..34babf8 100644
--- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
+++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
@@ -72,7 +72,7 @@ public class TcpTransportFactory extends TransportFactory {
    @Override
    public TransportServer doBind(final URI location) throws IOException {
       try {
-         Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
+         Map<String, String> options = new HashMap<>(URISupport.parseParameters(location));
 
          ServerSocketFactory serverSocketFactory = createServerSocketFactory();
          TcpTransportServer server = createTcpTransportServer(location, serverSocketFactory);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/usage/SystemUsage.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/usage/SystemUsage.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/usage/SystemUsage.java
index e36ab87..f6b4cde 100644
--- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/usage/SystemUsage.java
+++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/usage/SystemUsage.java
@@ -46,7 +46,7 @@ public class SystemUsage implements Service {
    private boolean sendFailIfNoSpaceAfterTimeoutExplicitySet;
    private long sendFailIfNoSpaceAfterTimeout = 0;
 
-   private final List<SystemUsage> children = new CopyOnWriteArrayList<SystemUsage>();
+   private final List<SystemUsage> children = new CopyOnWriteArrayList<>();
 
    public SystemUsage() {
       this("default", null, null, null);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java
index 2bd8382..d63d3c4 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java
@@ -70,7 +70,7 @@ public class ActiveMQMessageAuditTest extends TestCase {
       ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
       IdGenerator idGen = new IdGenerator();
       // add to a list
-      List<String> list = new ArrayList<String>();
+      List<String> list = new ArrayList<>();
       for (int i = 0; i < count; i++) {
          String id = idGen.generateId();
          list.add(id);
@@ -86,7 +86,7 @@ public class ActiveMQMessageAuditTest extends TestCase {
       int count = 10000;
       ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
       // add to a list
-      List<MessageReference> list = new ArrayList<MessageReference>();
+      List<MessageReference> list = new ArrayList<>();
       for (int i = 0; i < count; i++) {
          ProducerId pid = new ProducerId();
          pid.setConnectionId("test");
@@ -111,7 +111,7 @@ public class ActiveMQMessageAuditTest extends TestCase {
       ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
       IdGenerator idGen = new IdGenerator();
       // add to a list
-      List<String> list = new ArrayList<String>();
+      List<String> list = new ArrayList<>();
       for (int i = 0; i < count; i++) {
          String id = idGen.generateId();
          if (i == 0) {
@@ -136,7 +136,7 @@ public class ActiveMQMessageAuditTest extends TestCase {
       LOG.debug("Length: " + bytes.length);
       audit = recover(bytes);
 
-      List<MessageReference> list = new ArrayList<MessageReference>();
+      List<MessageReference> list = new ArrayList<>();
 
       for (int j = 0; j < 1000; j++) {
          ProducerId pid = new ProducerId();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/CombinationTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/CombinationTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/CombinationTestSupport.java
index 2b1b3bb..d7caafa 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/CombinationTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/CombinationTestSupport.java
@@ -67,7 +67,7 @@ public abstract class CombinationTestSupport extends AutoFailTestSupport {
 
    private static final Logger LOG = LoggerFactory.getLogger(CombinationTestSupport.class);
 
-   private final HashMap<String, ComboOption> comboOptions = new HashMap<String, ComboOption>();
+   private final HashMap<String, ComboOption> comboOptions = new HashMap<>();
    private boolean combosEvaluated;
    private Map<String, Object> options;
    protected File basedir;
@@ -85,7 +85,7 @@ public abstract class CombinationTestSupport extends AutoFailTestSupport {
    static class ComboOption {
 
       final String attribute;
-      final LinkedHashSet<Object> values = new LinkedHashSet<Object>();
+      final LinkedHashSet<Object> values = new LinkedHashSet<>();
 
       public ComboOption(String attribute, Collection<Object> options) {
          this.attribute = attribute;
@@ -206,8 +206,8 @@ public abstract class CombinationTestSupport extends AutoFailTestSupport {
       }
 
       try {
-         ArrayList<HashMap<String, Object>> expandedOptions = new ArrayList<HashMap<String, Object>>();
-         expandCombinations(new ArrayList<ComboOption>(comboOptions.values()), expandedOptions);
+         ArrayList<HashMap<String, Object>> expandedOptions = new ArrayList<>();
+         expandCombinations(new ArrayList<>(comboOptions.values()), expandedOptions);
 
          if (expandedOptions.isEmpty()) {
             combosEvaluated = true;
@@ -215,7 +215,7 @@ public abstract class CombinationTestSupport extends AutoFailTestSupport {
          }
          else {
 
-            ArrayList<CombinationTestSupport> result = new ArrayList<CombinationTestSupport>();
+            ArrayList<CombinationTestSupport> result = new ArrayList<>();
             // Run the test case for each possible combination
             for (Iterator<HashMap<String, Object>> iter = expandedOptions.iterator(); iter.hasNext(); ) {
                CombinationTestSupport combo = (CombinationTestSupport) TestSuite.createTest(getClass(), name);
@@ -240,14 +240,14 @@ public abstract class CombinationTestSupport extends AutoFailTestSupport {
       if (!optionsLeft.isEmpty()) {
          HashMap<String, Object> map;
          if (comboOptions.size() == optionsLeft.size()) {
-            map = new HashMap<String, Object>();
+            map = new HashMap<>();
             expandedCombos.add(map);
          }
          else {
             map = expandedCombos.get(expandedCombos.size() - 1);
          }
 
-         LinkedList<ComboOption> l = new LinkedList<ComboOption>(optionsLeft);
+         LinkedList<ComboOption> l = new LinkedList<>(optionsLeft);
          ComboOption comboOption = l.removeLast();
          int i = 0;
          if (comboOption.values.isEmpty() && !l.isEmpty()) {
@@ -257,7 +257,7 @@ public abstract class CombinationTestSupport extends AutoFailTestSupport {
             for (Iterator<Object> iter = comboOption.values.iterator(); iter.hasNext(); ) {
                Object value = iter.next();
                if (i != 0) {
-                  map = new HashMap<String, Object>(map);
+                  map = new HashMap<>(map);
                   expandedCombos.add(map);
                }
                map.put(comboOption.attribute, value);
@@ -271,7 +271,7 @@ public abstract class CombinationTestSupport extends AutoFailTestSupport {
    public static Test suite(Class<? extends CombinationTestSupport> clazz) {
       TestSuite suite = new TestSuite();
 
-      ArrayList<String> names = new ArrayList<String>();
+      ArrayList<String> names = new ArrayList<>();
       Method[] methods = clazz.getMethods();
       for (int i = 0; i < methods.length; i++) {
          String name = methods[i].getName();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSMessageTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSMessageTest.java
index 61a5de5..e38f92f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSMessageTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSMessageTest.java
@@ -271,7 +271,7 @@ public class JMSMessageTest extends JmsTestSupport {
       private long expiration;
       private int priority;
       private String text;
-      private final HashMap<String, Object> props = new HashMap<String, Object>();
+      private final HashMap<String, Object> props = new HashMap<>();
 
       @Override
       public String getJMSMessageID() throws JMSException {
@@ -438,7 +438,7 @@ public class JMSMessageTest extends JmsTestSupport {
 
       @Override
       public Enumeration<?> getPropertyNames() throws JMSException {
-         return new Vector<String>(props.keySet()).elements();
+         return new Vector<>(props.keySet()).elements();
       }
 
       @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java
index 0bf2799..e599071 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java
@@ -115,7 +115,7 @@ public class JmsConnectionStartStopTest extends TestSupport {
 
    public void testConcurrentSessionCreateWithStart() throws Exception {
       ThreadPoolExecutor executor = new ThreadPoolExecutor(50, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
-      final Vector<Throwable> exceptions = new Vector<Throwable>();
+      final Vector<Throwable> exceptions = new Vector<>();
       final Random rand = new Random();
       Runnable createSessionTask = new Runnable() {
          @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java
index 1a80ac9..1361b79 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java
@@ -65,7 +65,7 @@ public class JmsConsumerResetActiveListenerTest extends TestCase {
 
       final CountDownLatch latch = new CountDownLatch(2);
       final AtomicBoolean first = new AtomicBoolean(true);
-      final Vector<Object> results = new Vector<Object>();
+      final Vector<Object> results = new Vector<>();
       consumer.setMessageListener(new MessageListener() {
 
          @Override
@@ -116,7 +116,7 @@ public class JmsConsumerResetActiveListenerTest extends TestCase {
 
       final CountDownLatch latch = new CountDownLatch(2);
       final AtomicBoolean first = new AtomicBoolean(true);
-      final Vector<Object> results = new Vector<Object>();
+      final Vector<Object> results = new Vector<>();
       consumer.setMessageListener(new MessageListener() {
 
          @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
index 7848d6c..a826b0a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
@@ -514,8 +514,8 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport {
    @Override
    protected void setUp() throws Exception {
       super.setUp();
-      brokers = new HashMap<String, BrokerItem>();
-      destinations = new HashMap<String, Destination>();
+      brokers = new HashMap<>();
+      destinations = new HashMap<>();
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
index 233e9e0..5ee575e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
@@ -63,7 +63,7 @@ public class JmsMultipleClientsTestSupport {
 
    protected static final Logger LOG = LoggerFactory.getLogger(JmsMultipleClientsTestSupport.class);
 
-   protected Map<MessageConsumer, MessageIdList> consumers = new HashMap<MessageConsumer, MessageIdList>(); // Map of consumer with messages
+   protected Map<MessageConsumer, MessageIdList> consumers = new HashMap<>(); // Map of consumer with messages
    // received
    protected int consumerCount = 1;
    protected int producerCount = 1;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
index 059ec2c..b458223 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
@@ -363,7 +363,7 @@ public class JmsQueueBrowserTest extends JmsTestSupport {
       @SuppressWarnings("unchecked")
       Enumeration<Message> browserView = browser.getEnumeration();
 
-      List<Message> messages = new ArrayList<Message>();
+      List<Message> messages = new ArrayList<>();
       for (int i = 0; i < numMessages; i++) {
          Message m1 = consumer.receive(5000);
          assertNotNull("m1 is null for index: " + i, m1);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
index 412577e..b60c091 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
@@ -30,7 +30,7 @@ public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQ
 
    private static final Logger LOG = LoggerFactory.getLogger(JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.class);
 
-   private Queue<Exception> errors = new ConcurrentLinkedQueue<Exception>();
+   private Queue<Exception> errors = new ConcurrentLinkedQueue<>();
    private int delayBeforeStartingBroker = 1000;
    private BrokerService broker;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java
index 3c50c62..5b99ad9 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java
@@ -111,7 +111,7 @@ public class JmsRollbackRedeliveryTest {
       // Consume messages and rollback transactions
       {
          AtomicInteger received = new AtomicInteger();
-         Map<String, Boolean> rolledback = new ConcurrentHashMap<String, Boolean>();
+         Map<String, Boolean> rolledback = new ConcurrentHashMap<>();
          while (received.get() < nbMessages) {
             Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
             Destination destination = session.createQueue(destinationName);
@@ -148,7 +148,7 @@ public class JmsRollbackRedeliveryTest {
       // Consume messages and rollback transactions
       {
          AtomicInteger received = new AtomicInteger();
-         Map<String, Boolean> rolledback = new ConcurrentHashMap<String, Boolean>();
+         Map<String, Boolean> rolledback = new ConcurrentHashMap<>();
          Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
          Destination destination = session.createQueue(destinationName);
          MessageConsumer consumer = session.createConsumer(destination);
@@ -183,7 +183,7 @@ public class JmsRollbackRedeliveryTest {
       // Consume messages and rollback transactions
       {
          AtomicInteger received = new AtomicInteger();
-         Map<String, Boolean> rolledback = new ConcurrentHashMap<String, Boolean>();
+         Map<String, Boolean> rolledback = new ConcurrentHashMap<>();
          Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
          Destination destination = session.createQueue(destinationName);
          while (received.get() < nbMessages) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
index 19290c0..5932c06 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
@@ -145,7 +145,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
          producerNormal.send(producerDestination, message);
       }
 
-      Vector<Message> messages = new Vector<Message>();
+      Vector<Message> messages = new Vector<>();
       Message received;
       while ((received = consumer.receive(1000)) != null) {
          messages.add(received);
@@ -158,7 +158,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
 
       assertEquals("got all (normal plus one with ttl) messages", messageCount + 1, messages.size());
 
-      Vector<Message> dlqMessages = new Vector<Message>();
+      Vector<Message> dlqMessages = new Vector<>();
       while ((received = dlqConsumer.receive(1000)) != null) {
          dlqMessages.add(received);
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTempDestinationTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTempDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTempDestinationTest.java
index c1d75a4..9d04bf1 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTempDestinationTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTempDestinationTest.java
@@ -178,7 +178,7 @@ public class JmsTempDestinationTest extends TestCase {
       int count = 500;
       int dataSize = 1024;
 
-      ArrayList<BytesMessage> list = new ArrayList<BytesMessage>(count);
+      ArrayList<BytesMessage> list = new ArrayList<>(count);
       Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
       Queue queue = session.createTemporaryQueue();
       MessageProducer producer = session.createProducer(queue);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
index ce73a83..ad94f09 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
@@ -48,7 +48,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList
    private MessageProducer replyProducer;
    private Session serverSession;
    private Destination requestDestination;
-   private List<JMSException> failures = new Vector<JMSException>();
+   private List<JMSException> failures = new Vector<>();
    private boolean dynamicallyCreateProducer;
    private String clientSideClientID;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java
index 2a091b1..d95350e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java
@@ -250,7 +250,7 @@ public class MessageEvictionTest {
       // spooling to disk early so topic memory limit is not reached
       brokerService.getSystemUsage().getMemoryUsage().setLimit(500 * 1024);
 
-      final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
+      final List<PolicyEntry> policyEntries = new ArrayList<>();
       final PolicyEntry entry = new PolicyEntry();
       entry.setTopic(">");
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
index f2db097..80744bd 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
@@ -263,7 +263,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
       final CountDownLatch gotMessage = new CountDownLatch(2);
       final AtomicInteger count = new AtomicInteger(0);
       final int maxDeliveries = getRedeliveryPolicy().getMaximumRedeliveries();
-      final ArrayList<String> received = new ArrayList<String>();
+      final ArrayList<String> received = new ArrayList<>();
       consumer.setMessageListener(new MessageListener() {
          @Override
          public void onMessage(Message message) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java
index f8cc498..3418bf9 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java
@@ -57,7 +57,7 @@ public abstract class SpringTestSupport extends TestCase {
    }
 
    protected void assertSetEquals(String description, Object[] expected, Set<?> actual) {
-      Set<Object> expectedSet = new HashSet<Object>();
+      Set<Object> expectedSet = new HashSet<>();
       expectedSet.addAll(Arrays.asList(expected));
       assertEquals(description, expectedSet, actual);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
index 65b5243..5889689 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
@@ -201,7 +201,7 @@ public class AdvisoryTempDestinationTests extends TestCase {
       tempTopicEntry.setTempTopic(true);
 
       PolicyMap pMap = new PolicyMap();
-      final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
+      final List<PolicyEntry> policyEntries = new ArrayList<>();
       policyEntries.add(tempQueueEntry);
       policyEntries.add(tempTopicEntry);
       pMap.setPolicyEntries(policyEntries);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
index 8a9871e..feb9bc8 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
@@ -44,7 +44,7 @@ public class ConsumerListenerTest extends EmbeddedBrokerTestSupport implements C
    protected Session consumerSession2;
    protected int consumerCounter;
    protected ConsumerEventSource consumerEventSource;
-   protected BlockingQueue<ConsumerEvent> eventQueue = new ArrayBlockingQueue<ConsumerEvent>(1000);
+   protected BlockingQueue<ConsumerEvent> eventQueue = new ArrayBlockingQueue<>(1000);
    private Connection connection;
 
    public void testConsumerEvents() throws Exception {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8a1c5ba/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
index 0f0e118..1f00df7 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
@@ -45,7 +45,7 @@ public class DestinationListenerTest extends EmbeddedBrokerTestSupport implement
    protected ActiveMQConnection connection;
    protected ActiveMQQueue sampleQueue = new ActiveMQQueue("foo.bar");
    protected ActiveMQTopic sampleTopic = new ActiveMQTopic("cheese");
-   protected List<ActiveMQDestination> newDestinations = new ArrayList<ActiveMQDestination>();
+   protected List<ActiveMQDestination> newDestinations = new ArrayList<>();
 
    public void testDestiationSourceHasInitialDestinations() throws Exception {
       Thread.sleep(1000);


Mime
View raw message