activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/3] activemq-artemis git commit: Use generics more
Date Mon, 29 Feb 2016 03:30:27 GMT
Use generics more


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

Branch: refs/heads/master
Commit: 7c275cdb1aa7c015f3ddf80a00eb651424f302c2
Parents: e202240
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Sun Feb 28 01:06:59 2016 +0200
Committer: Ville Skyttä <ville.skytta@iki.fi>
Committed: Sun Feb 28 01:06:59 2016 +0200

----------------------------------------------------------------------
 .../ConnectionFactoryObjectFactory.java         |  2 +-
 .../referenceable/DestinationObjectFactory.java |  2 +-
 .../jndi/ActiveMQInitialContextFactory.java     | 18 +++-----
 .../activemq/artemis/jndi/ReadOnlyContext.java  | 29 ++++++------
 .../impl/JNDIConnectionFactoryFactory.java      |  2 +-
 .../jms/bridge/impl/JNDIDestinationFactory.java |  2 +-
 .../jms/bridge/impl/JNDIFactorySupport.java     |  4 +-
 .../management/impl/JMSQueueControlImpl.java    |  2 +-
 .../plug/test/minimalserver/DumbServer.java     |  8 ++--
 .../artemis/ra/ActiveMQResourceAdapter.java     |  4 +-
 .../ra/inflow/ActiveMQActivationSpec.java       |  2 +-
 .../selector/filter/ComparisonExpression.java   |  4 +-
 .../artemis/selector/impl/SelectorParser.java   |  2 +-
 .../server/impl/RemotingServiceImpl.java        |  6 +--
 .../core/server/cluster/ClusterManager.java     |  4 +-
 .../group/impl/RemoteGroupingHandler.java       |  2 +-
 .../core/server/impl/ActiveMQServerImpl.java    |  6 +--
 .../server/impl/PostOfficeJournalLoader.java    |  4 +-
 .../AbstractProtocolManagerFactory.java         |  2 +-
 .../security/jaas/CertificateLoginModule.java   |  2 +-
 .../core/security/jaas/GuestLoginModule.java    |  2 +-
 .../spi/core/security/jaas/InVMLoginModule.java |  2 +-
 .../spi/core/security/jaas/LDAPLoginModule.java |  2 +-
 .../security/jaas/PropertiesLoginModule.java    |  4 +-
 .../jaas/TextFileCertificateLoginModule.java    |  2 +-
 .../jaas/CertificateLoginModuleTest.java        |  7 +--
 .../core/security/jaas/LDAPLoginModuleTest.java |  9 ++--
 .../jaas/LDAPModuleRoleExpansionTest.java       |  9 ++--
 .../PropertiesLoginModuleRaceConditionTest.java |  2 +-
 .../TextFileCertificateLoginModuleTest.java     |  4 +-
 ...CreateDestinationsOnStartupViaXBeanTest.java |  3 +-
 .../org/apache/activemq/broker/SpringTest.java  |  8 ++--
 .../broker/ft/mKahaDbQueueMasterSlaveTest.java  |  4 +-
 .../apache/activemq/broker/jmx/MBeanTest.java   |  2 +-
 .../broker/mKahaDBXARecoveryBrokerTest.java     |  2 +-
 .../broker/mLevelDBXARecoveryBrokerTest.java    |  2 +-
 .../activemq/bugs/AMQ5266SingleDestTest.java    |  4 +-
 .../bugs/AMQ5266StarvedConsumerTest.java        |  4 +-
 .../org/apache/activemq/bugs/AMQ5266Test.java   |  4 +-
 .../org/apache/activemq/bugs/AMQ5450Test.java   |  4 +-
 .../command/ActiveMQDestinationTest.java        |  2 +-
 .../openwire/v1/MessageTestSupport.java         |  2 +-
 .../openwire/v2/MessageTestSupport.java         |  2 +-
 .../reliable/ReliableTransportTest.java         |  4 +-
 .../aerogear/AeroGearBasicServerTest.java       |  2 +-
 .../integration/jms/SimpleJNDIClientTest.java   | 46 ++++++++++----------
 .../jms/jms2client/InvalidDestinationTest.java  |  2 +-
 .../persistence/XmlImportExportTest.java        |  2 +-
 .../ra/ActiveMQRAClusteredTestBase.java         |  6 +--
 .../integration/security/LDAPSecurityTest.java  |  9 ++--
 ...cyLDAPSecuritySettingPluginListenerTest.java |  9 ++--
 .../LegacyLDAPSecuritySettingPluginTest.java    |  9 ++--
 .../integration/server/ConnectionLimitTest.java |  4 +-
 .../tests/integration/stomp/StompTestBase.java  |  6 +--
 .../jms/tests/message/SimpleJMSMapMessage.java  |  6 +--
 .../jms/tests/tools/container/InVMContext.java  |  7 +--
 .../container/InVMInitialContextFactory.java    |  6 +--
 .../InVMInitialContextFactoryBuilder.java       |  2 +-
 .../tools/container/NonSerializableFactory.java |  2 +-
 .../jms/conform/message/MessageTypeTest.java    |  2 +-
 .../message/headers/MessageHeaderTest.java      |  2 +-
 .../jtests/jms/framework/PTPTestCase.java       |  2 +-
 .../jtests/jms/framework/PubSubTestCase.java    |  2 +-
 .../jtests/jms/framework/UnifiedTestCase.java   |  2 +-
 .../impl/SequentialFileFactoryTestBase.java     |  2 +-
 65 files changed, 158 insertions(+), 169 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java
index 69db241..3443bf1 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java
@@ -34,7 +34,7 @@ public class ConnectionFactoryObjectFactory implements ObjectFactory {
    public Object getObjectInstance(final Object ref,
                                    final Name name,
                                    final Context ctx,
-                                   final Hashtable props) throws Exception {
+                                   final Hashtable<?, ?> props) throws Exception {
       Reference r = (Reference) ref;
 
       byte[] bytes = (byte[]) r.get("ActiveMQ-CF").getContent();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java
index 4f4ea65..a2c8333 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java
@@ -34,7 +34,7 @@ public class DestinationObjectFactory implements ObjectFactory {
    public Object getObjectInstance(final Object ref,
                                    final Name name,
                                    final Context ctx,
-                                   final Hashtable props) throws Exception {
+                                   final Hashtable<?, ?> props) throws Exception {
       Reference r = (Reference) ref;
 
       byte[] bytes = (byte[]) r.get("ActiveMQ-DEST").getContent();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java
index 4f019c9..8b5a431 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java
@@ -23,7 +23,6 @@ import javax.naming.Context;
 import javax.naming.NamingException;
 import javax.naming.spi.InitialContextFactory;
 import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -48,11 +47,10 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory {
    private String topicPrefix = "topic.";
 
    @Override
-   public Context getInitialContext(Hashtable environment) throws NamingException {
+   public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException {
       // lets create a factory
       Map<String, Object> data = new ConcurrentHashMap<>();
-      for (Iterator iter = environment.entrySet().iterator(); iter.hasNext(); ) {
-         Map.Entry entry = (Map.Entry) iter.next();
+      for (Map.Entry<?, ?> entry : environment.entrySet()) {
          String key = entry.getKey().toString();
          if (key.startsWith(connectionFactoryPrefix)) {
             String jndiName = key.substring(connectionFactoryPrefix.length());
@@ -111,13 +109,12 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory {
    // Implementation methods
    // -------------------------------------------------------------------------
 
-   protected ReadOnlyContext createContext(Hashtable environment, Map<String, Object> data) {
+   protected ReadOnlyContext createContext(Hashtable<?, ?> environment, Map<String, Object> data) {
       return new ReadOnlyContext(environment, data);
    }
 
-   protected void createQueues(Map<String, Object> data, Hashtable environment) {
-      for (Iterator iter = environment.entrySet().iterator(); iter.hasNext(); ) {
-         Map.Entry entry = (Map.Entry) iter.next();
+   protected void createQueues(Map<String, Object> data, Hashtable<?, ?> environment) {
+      for (Map.Entry<?, ?> entry : environment.entrySet()) {
          String key = entry.getKey().toString();
          if (key.startsWith(queuePrefix)) {
             String jndiName = key.substring(queuePrefix.length());
@@ -126,9 +123,8 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory {
       }
    }
 
-   protected void createTopics(Map<String, Object> data, Hashtable environment) {
-      for (Iterator iter = environment.entrySet().iterator(); iter.hasNext(); ) {
-         Map.Entry entry = (Map.Entry) iter.next();
+   protected void createTopics(Map<String, Object> data, Hashtable<?, ?> environment) {
+      for (Map.Entry<?, ?> entry : environment.entrySet()) {
          String key = entry.getKey().toString();
          if (key.startsWith(topicPrefix)) {
             String jndiName = key.substring(topicPrefix.length());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java
index 97d02a6..f3873ef 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java
@@ -112,7 +112,7 @@ public class ReadOnlyContext implements Context, Serializable {
       frozen = true;
    }
 
-   public ReadOnlyContext(Hashtable environment, Map bindings, String nameInNamespace) {
+   public ReadOnlyContext(Hashtable environment, Map<String, Object> bindings, String nameInNamespace) {
       this(environment, bindings);
       this.nameInNamespace = nameInNamespace;
    }
@@ -181,9 +181,8 @@ public class ReadOnlyContext implements Context, Serializable {
          ReadOnlyContext readOnlyContext = (ReadOnlyContext) o;
          String remainder = name.substring(pos + 1);
          Map<String, Object> subBindings = readOnlyContext.internalBind(remainder, value);
-         for (Iterator iterator = subBindings.entrySet().iterator(); iterator.hasNext(); ) {
-            Map.Entry entry = (Map.Entry) iterator.next();
-            String subName = segment + "/" + (String) entry.getKey();
+         for (Map.Entry<String, Object> entry : subBindings.entrySet()) {
+            String subName = segment + "/" + entry.getKey();
             Object bound = entry.getValue();
             treeBindings.put(subName, bound);
             newBindings.put(subName, bound);
@@ -302,7 +301,7 @@ public class ReadOnlyContext implements Context, Serializable {
    }
 
    @Override
-   public NamingEnumeration list(String name) throws NamingException {
+   public NamingEnumeration<NameClassPair> list(String name) throws NamingException {
       Object o = lookup(name);
       if (o == this) {
          return new ListEnumeration();
@@ -316,7 +315,7 @@ public class ReadOnlyContext implements Context, Serializable {
    }
 
    @Override
-   public NamingEnumeration listBindings(String name) throws NamingException {
+   public NamingEnumeration<Binding> listBindings(String name) throws NamingException {
       Object o = lookup(name);
       if (o == this) {
          return new ListBindingEnumeration();
@@ -335,12 +334,12 @@ public class ReadOnlyContext implements Context, Serializable {
    }
 
    @Override
-   public NamingEnumeration list(Name name) throws NamingException {
+   public NamingEnumeration<NameClassPair> list(Name name) throws NamingException {
       return list(name.toString());
    }
 
    @Override
-   public NamingEnumeration listBindings(Name name) throws NamingException {
+   public NamingEnumeration<Binding> listBindings(Name name) throws NamingException {
       return listBindings(name.toString());
    }
 
@@ -426,7 +425,7 @@ public class ReadOnlyContext implements Context, Serializable {
 
    private abstract class LocalNamingEnumeration implements NamingEnumeration {
 
-      private final Iterator i = bindings.entrySet().iterator();
+      private final Iterator<Map.Entry<String, Object>> i = bindings.entrySet().iterator();
 
       @Override
       public boolean hasMore() throws NamingException {
@@ -438,8 +437,8 @@ public class ReadOnlyContext implements Context, Serializable {
          return i.hasNext();
       }
 
-      protected Map.Entry getNext() {
-         return (Map.Entry) i.next();
+      protected Map.Entry<String, Object> getNext() {
+         return i.next();
       }
 
       @Override
@@ -459,8 +458,8 @@ public class ReadOnlyContext implements Context, Serializable {
 
       @Override
       public Object nextElement() {
-         Map.Entry entry = getNext();
-         return new NameClassPair((String) entry.getKey(), entry.getValue().getClass().getName());
+         Map.Entry<String, Object> entry = getNext();
+         return new NameClassPair(entry.getKey(), entry.getValue().getClass().getName());
       }
    }
 
@@ -476,8 +475,8 @@ public class ReadOnlyContext implements Context, Serializable {
 
       @Override
       public Object nextElement() {
-         Map.Entry entry = getNext();
-         return new Binding((String) entry.getKey(), entry.getValue());
+         Map.Entry<String, Object> entry = getNext();
+         return new Binding(entry.getKey(), entry.getValue());
       }
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java
index 9a9d41a..95c3ce9 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java
@@ -22,7 +22,7 @@ import java.util.Hashtable;
 
 public class JNDIConnectionFactoryFactory extends JNDIFactorySupport implements ConnectionFactoryFactory {
 
-   public JNDIConnectionFactoryFactory(final Hashtable jndiProperties, final String lookup) {
+   public JNDIConnectionFactoryFactory(final Hashtable<?, ?> jndiProperties, final String lookup) {
       super(jndiProperties, lookup);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java
index 93877f2..2fc864f 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java
@@ -24,7 +24,7 @@ import javax.jms.Destination;
 
 public class JNDIDestinationFactory extends JNDIFactorySupport implements DestinationFactory {
 
-   public JNDIDestinationFactory(final Hashtable jndiProperties, final String lookup) {
+   public JNDIDestinationFactory(final Hashtable<?, ?> jndiProperties, final String lookup) {
       super(jndiProperties, lookup);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIFactorySupport.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIFactorySupport.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIFactorySupport.java
index c29793a..b94e3f5 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIFactorySupport.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIFactorySupport.java
@@ -22,11 +22,11 @@ import javax.naming.InitialContext;
 
 public abstract class JNDIFactorySupport {
 
-   protected Hashtable jndiProperties;
+   protected Hashtable<?, ?> jndiProperties;
 
    protected String lookup;
 
-   protected JNDIFactorySupport(final Hashtable jndiProperties, final String lookup) {
+   protected JNDIFactorySupport(final Hashtable<?, ?> jndiProperties, final String lookup) {
       this.jndiProperties = jndiProperties;
 
       this.lookup = lookup;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java
index d6ca969..d337d99 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java
@@ -320,7 +320,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro
    }
 
    @Override
-   public String sendTextMessage(Map headers, String body) throws Exception {
+   public String sendTextMessage(Map<String, String> headers, String body) throws Exception {
       return sendTextMessage(headers, body, null, null);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/DumbServer.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/DumbServer.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/DumbServer.java
index 404fc5a..10499ef 100644
--- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/DumbServer.java
+++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/DumbServer.java
@@ -25,11 +25,11 @@ public class DumbServer {
 
    static ConcurrentMap<String, BlockingDeque<Object>> maps = new ConcurrentHashMap<>();
 
-   public static BlockingDeque getQueue(String name) {
-      BlockingDeque q = maps.get(name);
+   public static BlockingDeque<Object> getQueue(String name) {
+      BlockingDeque<Object> q = maps.get(name);
       if (q == null) {
-         q = new LinkedBlockingDeque();
-         BlockingDeque oldValue = maps.putIfAbsent(name, q);
+         q = new LinkedBlockingDeque<>();
+         BlockingDeque<Object> oldValue = maps.putIfAbsent(name, q);
          if (oldValue != null) {
             q = oldValue;
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
index 8c1a9b4..209ae75 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
@@ -1630,7 +1630,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
 
       if (!knownConnectionFactories.keySet().contains(overrideProperties)) {
          cf = newConnectionFactory(overrideProperties);
-         knownConnectionFactories.put(overrideProperties, new Pair(cf, new AtomicInteger(1)));
+         knownConnectionFactories.put(overrideProperties, new Pair<>(cf, new AtomicInteger(1)));
       }
       else {
          Pair<ActiveMQConnectionFactory, AtomicInteger> pair = knownConnectionFactories.get(overrideProperties);
@@ -1642,7 +1642,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
       if (known && cf.getServerLocator().isClosed()) {
          knownConnectionFactories.remove(overrideProperties);
          cf = newConnectionFactory(overrideProperties);
-         knownConnectionFactories.put(overrideProperties, new Pair(cf, new AtomicInteger(1)));
+         knownConnectionFactories.put(overrideProperties, new Pair<>(cf, new AtomicInteger(1)));
       }
 
       return cf;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
index 91ee707..3f24300 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
@@ -124,7 +124,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
 
    private String jndiParams = null;
 
-   private Hashtable parsedJndiParams;
+   private Hashtable<String, String> parsedJndiParams;
 
    /* use local tx instead of XA*/
    private Boolean localTx;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java
----------------------------------------------------------------------
diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java
index 7419788..9389e01 100755
--- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java
+++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java
@@ -178,7 +178,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
       return UnaryExpression.createNOT(createLike(left, right, escape));
    }
 
-   public static BooleanExpression createInFilter(Expression left, List elements) {
+   public static BooleanExpression createInFilter(Expression left, List<Object> elements) {
 
       if (!(left instanceof PropertyExpression)) {
          throw new RuntimeException("Expected a property for In expression, got: " + left);
@@ -187,7 +187,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
 
    }
 
-   public static BooleanExpression createNotInFilter(Expression left, List elements) {
+   public static BooleanExpression createNotInFilter(Expression left, List<Object> elements) {
 
       if (!(left instanceof PropertyExpression)) {
          throw new RuntimeException("Expected a property for In expression, got: " + left);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/SelectorParser.java
----------------------------------------------------------------------
diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/SelectorParser.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/SelectorParser.java
index 1eaf05d..1cea9ba 100644
--- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/SelectorParser.java
+++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/SelectorParser.java
@@ -28,7 +28,7 @@ import org.apache.activemq.artemis.selector.strict.StrictParser;
  */
 public class SelectorParser {
 
-   private static final LRUCache cache = new LRUCache(100);
+   private static final LRUCache<String, Object> cache = new LRUCache<>(100);
    private static final String CONVERT_STRING_EXPRESSIONS_PREFIX = "convert_string_expressions:";
    private static final String HYPHENATED_PROPS_PREFIX = "hyphenated_props:";
    private static final String NO_CONVERT_STRING_EXPRESSIONS_PREFIX = "no_convert_string_expressions:";

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
index 03fadd7..ba3d0b0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
@@ -107,7 +107,7 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
 
    private final ClusterManager clusterManager;
 
-   private final Map<String, ProtocolManagerFactory> protocolMap = new ConcurrentHashMap();
+   private final Map<String, ProtocolManagerFactory> protocolMap = new ConcurrentHashMap<>();
 
    private ActiveMQPrincipal defaultInvmSecurityPrincipal;
 
@@ -213,7 +213,7 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
          try {
             AcceptorFactory factory = server.getServiceRegistry().getAcceptorFactory(info.getName(), info.getFactoryClassName());
 
-            Map<String, ProtocolManagerFactory> selectedProtocolFactories = new ConcurrentHashMap();
+            Map<String, ProtocolManagerFactory> selectedProtocolFactories = new ConcurrentHashMap<>();
 
             @SuppressWarnings("deprecation")
             String protocol = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOL_PROP_NAME, null, info.getParams());
@@ -235,7 +235,7 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
                selectedProtocolFactories = protocolMap;
             }
 
-            Map<String, ProtocolManager> selectedProtocols = new ConcurrentHashMap();
+            Map<String, ProtocolManager> selectedProtocols = new ConcurrentHashMap<>();
             for (Map.Entry<String, ProtocolManagerFactory> entry: selectedProtocolFactories.entrySet()) {
                selectedProtocols.put(entry.getKey(), entry.getValue().createProtocolManager(server, info.getExtraParams(), incomingInterceptors, outgoingInterceptors));
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
index a85e070..9ad1137 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
@@ -79,9 +79,9 @@ public final class ClusterManager implements ActiveMQComponent {
 
    private HAManager haManager;
 
-   private final Map<String, BroadcastGroup> broadcastGroups = new HashMap();
+   private final Map<String, BroadcastGroup> broadcastGroups = new HashMap<>();
 
-   private final Map<String, Bridge> bridges = new HashMap();
+   private final Map<String, Bridge> bridges = new HashMap<>();
 
    private final ExecutorFactory executorFactory;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java
index 06ddc95..26841e4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java
@@ -60,7 +60,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract {
 
    private final ConcurrentMap<SimpleString, List<SimpleString>> groupMap = new ConcurrentHashMap<>();
 
-   private final ConcurrentHashSet<Notification> pendingNotifications = new ConcurrentHashSet();
+   private final ConcurrentHashSet<Notification> pendingNotifications = new ConcurrentHashSet<>();
 
    private boolean started = false;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 1934f2f..7554127 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -1807,15 +1807,15 @@ public class ActiveMQServerImpl implements ActiveMQServer {
 
       JournalLoadInformation[] journalInfo = new JournalLoadInformation[2];
 
-      List<QueueBindingInfo> queueBindingInfos = new ArrayList();
+      List<QueueBindingInfo> queueBindingInfos = new ArrayList<>();
 
-      List<GroupingInfo> groupingInfos = new ArrayList();
+      List<GroupingInfo> groupingInfos = new ArrayList<>();
 
       journalInfo[0] = storageManager.loadBindingJournal(queueBindingInfos, groupingInfos);
 
       recoverStoredConfigs();
 
-      Map<Long, QueueBindingInfo> queueBindingInfosMap = new HashMap();
+      Map<Long, QueueBindingInfo> queueBindingInfosMap = new HashMap<>();
 
       journalLoader.initQueues(queueBindingInfosMap, queueBindingInfos);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
index e67142e..5c3f096 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
@@ -427,14 +427,14 @@ public class PostOfficeJournalLoader implements JournalLoader {
          Map<Long, Map<Long, List<PageCountPending>>> perPageMap = perAddressMap.get(address);
 
          if (perPageMap == null) {
-            perPageMap = new HashMap();
+            perPageMap = new HashMap<>();
             perAddressMap.put(address, perPageMap);
          }
 
          Map<Long, List<PageCountPending>> perQueueMap = perPageMap.get(pageID);
 
          if (perQueueMap == null) {
-            perQueueMap = new HashMap();
+            perQueueMap = new HashMap<>();
             perPageMap.put(pageID, perQueueMap);
          }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
index 6a61065..fcca774 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
@@ -39,7 +39,7 @@ public abstract class AbstractProtocolManagerFactory<P extends BaseInterceptor>
          return Collections.emptyList();
       }
       else {
-         CopyOnWriteArrayList<P> listOut = new CopyOnWriteArrayList();
+         CopyOnWriteArrayList<P> listOut = new CopyOnWriteArrayList<>();
          for (BaseInterceptor<?> in : listIn) {
             if (type.isInstance(in)) {
                listOut.add((P) in);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
index d2fe1fe..c67a036 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
@@ -51,7 +51,7 @@ public abstract class CertificateLoginModule extends PropertiesLoader implements
     * Overriding to allow for proper initialization. Standard JAAS.
     */
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
+   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
       this.subject = subject;
       this.callbackHandler = callbackHandler;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
index a1b5964..e99f072 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
@@ -53,7 +53,7 @@ public class GuestLoginModule implements LoginModule {
    private boolean loginSucceeded;
 
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
+   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
       this.subject = subject;
       this.callbackHandler = callbackHandler;
       debug = "true".equalsIgnoreCase((String) options.get("debug"));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
index b1b3b42..2fc23c0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
@@ -46,7 +46,7 @@ public class InVMLoginModule implements LoginModule {
    private boolean loginSucceeded;
 
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
+   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
       this.subject = subject;
       this.callbackHandler = callbackHandler;
       this.configuration = (SecurityConfiguration) options.get(CONFIG_PROP_NAME);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
index 7afb8e4..3802d7b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
@@ -82,7 +82,7 @@ public class LDAPLoginModule implements LoginModule {
    private Set<RolePrincipal> groups = new HashSet<>();
 
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
+   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
       this.subject = subject;
       this.handler = callbackHandler;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
index c870b28..038823f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
@@ -51,8 +51,8 @@ public class PropertiesLoginModule extends PropertiesLoader implements LoginModu
    @Override
    public void initialize(Subject subject,
                           CallbackHandler callbackHandler,
-                          Map sharedState,
-                          Map options) {
+                          Map<String, ?> sharedState,
+                          Map<String, ?> options) {
       this.subject = subject;
       this.callbackHandler = callbackHandler;
       loginSucceeded = false;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
index 8bfac9b..404d45d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
@@ -49,7 +49,7 @@ public class TextFileCertificateLoginModule extends CertificateLoginModule {
     * Performs initialization of file paths. A standard JAAS override.
     */
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
+   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
       super.initialize(subject, callbackHandler, sharedState, options);
       usersByDn = load(USER_FILE_PROP_NAME, "", options).invertedPropertiesMap();
       roles = load(ROLE_FILE_PROP_NAME, "", options).getProps();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/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 4488973..102a364 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
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.security.Principal;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import java.util.Vector;
@@ -59,7 +58,7 @@ public class CertificateLoginModuleTest extends Assert {
       loginModule = new StubCertificateLoginModule(userName, new HashSet<>(rolesNames));
       JaasCallbackHandler callbackHandler = new JaasCallbackHandler(null, null, null);
 
-      loginModule.initialize(subject, callbackHandler, null, new HashMap());
+      loginModule.initialize(subject, callbackHandler, null, new HashMap<String, Object>());
 
       loginModule.login();
       loginModule.commit();
@@ -72,9 +71,7 @@ public class CertificateLoginModuleTest extends Assert {
          rolesFound[i] = false;
       }
 
-      for (Iterator iter = subject.getPrincipals().iterator(); iter.hasNext(); ) {
-         Principal currentPrincipal = (Principal) iter.next();
-
+      for (Principal currentPrincipal : subject.getPrincipals()) {
          if (currentPrincipal instanceof UserPrincipal) {
             if (currentPrincipal.getName().equals(USER_NAME)) {
                if (!nameFound) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java
index 758eee1..17eae10 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java
@@ -70,11 +70,10 @@ public class LDAPLoginModuleTest extends AbstractLdapTestUnit {
       }
    }
 
-   @SuppressWarnings("unchecked")
    @Test
    public void testRunning() throws Exception {
 
-      Hashtable env = new Hashtable();
+      Hashtable<String, String> env = new Hashtable<>();
       env.put(Context.PROVIDER_URL, "ldap://localhost:1024");
       env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
       env.put(Context.SECURITY_AUTHENTICATION, "simple");
@@ -82,12 +81,12 @@ public class LDAPLoginModuleTest extends AbstractLdapTestUnit {
       env.put(Context.SECURITY_CREDENTIALS, CREDENTIALS);
       DirContext ctx = new InitialDirContext(env);
 
-      HashSet set = new HashSet();
+      HashSet<String> set = new HashSet<>();
 
-      NamingEnumeration list = ctx.list("ou=system");
+      NamingEnumeration<NameClassPair> list = ctx.list("ou=system");
 
       while (list.hasMore()) {
-         NameClassPair ncp = (NameClassPair) list.next();
+         NameClassPair ncp = list.next();
          set.add(ncp.getName());
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java
index 0aa13a8..afd723c 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java
@@ -70,11 +70,10 @@ public class LDAPModuleRoleExpansionTest extends AbstractLdapTestUnit {
       }
    }
 
-   @SuppressWarnings("unchecked")
    @Test
    public void testRunning() throws Exception {
 
-      Hashtable env = new Hashtable();
+      Hashtable<String, String> env = new Hashtable<>();
       env.put(Context.PROVIDER_URL, "ldap://localhost:1024");
       env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
       env.put(Context.SECURITY_AUTHENTICATION, "simple");
@@ -82,12 +81,12 @@ public class LDAPModuleRoleExpansionTest extends AbstractLdapTestUnit {
       env.put(Context.SECURITY_CREDENTIALS, CREDENTIALS);
       DirContext ctx = new InitialDirContext(env);
 
-      HashSet set = new HashSet();
+      HashSet<String> set = new HashSet<>();
 
-      NamingEnumeration list = ctx.list("ou=system");
+      NamingEnumeration<NameClassPair> list = ctx.list("ou=system");
 
       while (list.hasMore()) {
-         NameClassPair ncp = (NameClassPair) list.next();
+         NameClassPair ncp = list.next();
          set.add(ncp.getName());
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/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 767a1f1..8c39d18 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<>(), options);
+            module.initialize(subject, callback, new HashMap<String, Object>(), options);
             module.login();
             module.commit();
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/TextFileCertificateLoginModuleTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/TextFileCertificateLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/TextFileCertificateLoginModuleTest.java
index 0eb736c..3dbe9ef 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/TextFileCertificateLoginModuleTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/TextFileCertificateLoginModuleTest.java
@@ -75,7 +75,7 @@ public class TextFileCertificateLoginModuleTest {
 
    private void loginTest(String usersFiles, String groupsFile) throws LoginException {
 
-      HashMap options = new HashMap<String, String>();
+      HashMap<String, String> options = new HashMap<>();
       options.put("org.apache.activemq.jaas.textfiledn.user", usersFiles);
       options.put("org.apache.activemq.jaas.textfiledn.role", groupsFile);
       options.put("reload", "true");
@@ -113,7 +113,7 @@ public class TextFileCertificateLoginModuleTest {
       return new JaasCallbackHandler(null, null, new X509Certificate[]{cert});
    }
 
-   private Subject doAuthenticate(HashMap options, JaasCallbackHandler callbackHandler) throws LoginException {
+   private Subject doAuthenticate(HashMap<String, ?> options, JaasCallbackHandler callbackHandler) throws LoginException {
       Subject mySubject = new Subject();
       loginModule.initialize(mySubject, callbackHandler, null, options);
       loginModule.login();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
index db8db63..c5fc22a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
@@ -20,6 +20,7 @@ import java.net.URI;
 import java.util.Set;
 
 import org.apache.activemq.EmbeddedBrokerTestSupport;
+import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
@@ -48,7 +49,7 @@ public class CreateDestinationsOnStartupViaXBeanTest extends EmbeddedBrokerTestS
    }
 
    protected void assertDestinationCreated(ActiveMQDestination destination, boolean expected) throws Exception {
-      Set answer = broker.getBroker().getDestinations(destination);
+      Set<Destination> answer = broker.getBroker().getDestinations(destination);
       int size = expected ? 1 : 0;
       assertEquals("Could not find destination: " + destination + ". Size of found destinations: " + answer, size, answer.size());
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java
index 8f37e6b..e7f22c6 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java
@@ -18,9 +18,10 @@
 package org.apache.activemq.broker;
 
 import java.io.File;
-import java.util.Iterator;
 import java.util.List;
 
+import javax.jms.Message;
+
 import junit.framework.TestCase;
 
 import org.apache.activemq.spring.SpringConsumer;
@@ -67,10 +68,9 @@ public class SpringTest extends TestCase {
       consumer.waitForMessagesToArrive(producer.getMessageCount());
 
       // now lets check that the consumer has received some messages
-      List messages = consumer.flushMessages();
+      List<Message> messages = consumer.flushMessages();
       LOG.info("Consumer has received messages....");
-      for (Iterator iter = messages.iterator(); iter.hasNext(); ) {
-         Object message = iter.next();
+      for (Message message : messages) {
          LOG.info("Received: " + message);
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java
index e06bb20..cbde640 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java
@@ -41,7 +41,7 @@ public class mKahaDbQueueMasterSlaveTest extends QueueMasterSlaveTestSupport {
       master.setDeleteAllMessagesOnStartup(true);
 
       MultiKahaDBPersistenceAdapter mKahaDB = new MultiKahaDBPersistenceAdapter();
-      List adapters = new LinkedList<FilteredKahaDBPersistenceAdapter>();
+      List<FilteredKahaDBPersistenceAdapter> adapters = new LinkedList<>();
       FilteredKahaDBPersistenceAdapter defaultEntry = new FilteredKahaDBPersistenceAdapter();
       defaultEntry.setPersistenceAdapter(new KahaDBPersistenceAdapter());
       defaultEntry.setPerDestination(true);
@@ -72,7 +72,7 @@ public class mKahaDbQueueMasterSlaveTest extends QueueMasterSlaveTestSupport {
                broker.setPersistent(true);
 
                MultiKahaDBPersistenceAdapter mKahaDB = new MultiKahaDBPersistenceAdapter();
-               List adapters = new LinkedList<FilteredKahaDBPersistenceAdapter>();
+               List<FilteredKahaDBPersistenceAdapter> adapters = new LinkedList<>();
                FilteredKahaDBPersistenceAdapter defaultEntry = new FilteredKahaDBPersistenceAdapter();
                defaultEntry.setPersistenceAdapter(new KahaDBPersistenceAdapter());
                defaultEntry.setPerDestination(true);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
index be9e222..98afe30 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
@@ -1432,7 +1432,7 @@ public class MBeanTest extends EmbeddedBrokerTestSupport {
       ObjectName brokerName = assertRegisteredObjectName(domain + ":type=Broker,brokerName=localhost");
       BrokerViewMBean brokerView = MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
 
-      Map connectors = brokerView.getTransportConnectors();
+      Map<String, String> connectors = brokerView.getTransportConnectors();
       LOG.info("Connectors: " + connectors);
       assertEquals("one connector", 1, connectors.size());
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java
index 8d6de73..a34759a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java
@@ -34,7 +34,7 @@ public class mKahaDBXARecoveryBrokerTest extends XARecoveryBrokerTest {
       super.configureBroker(broker);
 
       MultiKahaDBPersistenceAdapter mKahaDB = new MultiKahaDBPersistenceAdapter();
-      List adapters = new LinkedList<FilteredKahaDBPersistenceAdapter>();
+      List<FilteredKahaDBPersistenceAdapter> adapters = new LinkedList<>();
       FilteredKahaDBPersistenceAdapter defaultEntry = new FilteredKahaDBPersistenceAdapter();
       defaultEntry.setPersistenceAdapter(new KahaDBPersistenceAdapter());
       adapters.add(defaultEntry);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java
index 06e3771..bdaaeb3 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java
@@ -34,7 +34,7 @@ public class mLevelDBXARecoveryBrokerTest extends XARecoveryBrokerTest {
       super.configureBroker(broker);
 
       MultiKahaDBPersistenceAdapter mKahaDB = new MultiKahaDBPersistenceAdapter();
-      List adapters = new LinkedList<FilteredKahaDBPersistenceAdapter>();
+      List<FilteredKahaDBPersistenceAdapter> adapters = new LinkedList<>();
       FilteredKahaDBPersistenceAdapter defaultEntry = new FilteredKahaDBPersistenceAdapter();
       defaultEntry.setPersistenceAdapter(new LevelDBPersistenceAdapter());
       adapters.add(defaultEntry);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java
index 6cf42f3..98fc79b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java
@@ -175,8 +175,8 @@ public class AMQ5266SingleDestTest {
 
       publisher.waitForCompletion();
 
-      List publishedIds = publisher.getIDs();
-      distinctPublishedCount = new TreeSet(publishedIds).size();
+      List<String> publishedIds = publisher.getIDs();
+      distinctPublishedCount = new TreeSet<>(publishedIds).size();
 
       LOG.info("Publisher Complete. Published: " + publishedIds.size() + ", Distinct IDs Published: " + distinctPublishedCount);
       LOG.info("Publisher duration: {}", TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - totalStart));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java
index 0bef00b..c7bc6d2 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java
@@ -182,8 +182,8 @@ public class AMQ5266StarvedConsumerTest {
 
       publisher.waitForCompletion();
 
-      List publishedIds = publisher.getIDs();
-      distinctPublishedCount = new TreeSet(publishedIds).size();
+      List<String> publishedIds = publisher.getIDs();
+      distinctPublishedCount = new TreeSet<>(publishedIds).size();
 
       LOG.info("Publisher Complete. Published: " + publishedIds.size() + ", Distinct IDs Published: " + distinctPublishedCount);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java
index bfbb49d..c5712b8 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java
@@ -166,8 +166,8 @@ public class AMQ5266Test {
 
       publisher.waitForCompletion();
 
-      List publishedIds = publisher.getIDs();
-      distinctPublishedCount = new TreeSet(publishedIds).size();
+      List<String> publishedIds = publisher.getIDs();
+      distinctPublishedCount = new TreeSet<>(publishedIds).size();
 
       LOG.info("Publisher Complete. Published: " + publishedIds.size() + ", Distinct IDs Published: " + distinctPublishedCount);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5450Test.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5450Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5450Test.java
index 7ea4044..d0066a3 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5450Test.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5450Test.java
@@ -53,7 +53,7 @@ public class AMQ5450Test {
    private final static String[] DESTS = new String[]{DESTINATION_NAME, DESTINATION_NAME_2, DESTINATION_NAME_3, DESTINATION_NAME, DESTINATION_NAME};
 
    BrokerService broker;
-   private HashMap<Object, PersistenceAdapter> adapters = new HashMap();
+   private HashMap<Object, PersistenceAdapter> adapters = new HashMap<>();
 
    @After
    public void tearDown() throws Exception {
@@ -98,7 +98,7 @@ public class AMQ5450Test {
          assertEquals(1, destination2.getMessageStore().getMessageCount());
       }
 
-      HashMap numDests = new HashMap();
+      HashMap<Integer, PersistenceAdapter> numDests = new HashMap<>();
       for (PersistenceAdapter pa : adapters.values()) {
          numDests.put(pa.getDestinations().size(), pa);
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java
index bd5dd0d..4864c31 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java
@@ -49,7 +49,7 @@ public class ActiveMQDestinationTest extends DataStructureTestSupport {
    }
 
    public void testDestinationOptions() throws IOException {
-      Map options = destination.getOptions();
+      Map<String, String> options = destination.getOptions();
       assertNotNull(options);
       assertEquals("v1", options.get("k1"));
       assertEquals("v2", options.get("k2"));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
index fa45153..2313d61 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
@@ -62,7 +62,7 @@ public abstract class MessageTestSupport extends BaseCommandTestSupport {
       }
 
       {
-         Map map = new HashMap();
+         Map<String, Object> map = new HashMap<>();
          map.put("MarshalledProperties", 12);
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          DataOutputStream os = new DataOutputStream(baos);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
index 9c467df..ae4c3c7 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
@@ -61,7 +61,7 @@ public abstract class MessageTestSupport extends BaseCommandTestSupport {
          info.setContent(baos.toByteSequence());
       }
       {
-         Map map = new HashMap();
+         Map<String, Object> map = new HashMap<>();
          map.put("MarshalledProperties", 12);
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          DataOutputStream os = new DataOutputStream(baos);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
index 44bcfbf..19edf10 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
@@ -104,8 +104,8 @@ public class ReliableTransportTest extends TestCase {
          transport.onCommand(info);
       }
 
-      Queue exceptions = listener.getExceptions();
-      Queue commands = listener.getCommands();
+      Queue<Object> exceptions = listener.getExceptions();
+      Queue<Object> commands = listener.getCommands();
       if (expected) {
          if (!exceptions.isEmpty()) {
             Exception e = (Exception) exceptions.remove();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/aerogear/AeroGearBasicServerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/aerogear/AeroGearBasicServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/aerogear/AeroGearBasicServerTest.java
index a667770..6882ca0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/aerogear/AeroGearBasicServerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/aerogear/AeroGearBasicServerTest.java
@@ -71,7 +71,7 @@ public class AeroGearBasicServerTest extends ActiveMQTestBase {
       connector0.setHost("localhost");
       jetty.addConnector(connector0);
       jetty.start();
-      HashMap<String, Object> params = new HashMap();
+      HashMap<String, Object> params = new HashMap<>();
       params.put(AeroGearConstants.QUEUE_NAME, "testQueue");
       params.put(AeroGearConstants.ENDPOINT_NAME, "http://localhost:8080");
       params.put(AeroGearConstants.APPLICATION_ID_NAME, "9d646a12-e601-4452-9e05-efb0fccdfd08");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
index c4df3f2..ede3419 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
@@ -82,7 +82,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testVMCF0() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.ConnectionFactory", "vm://0");
       Context ctx = new InitialContext(props);
@@ -94,7 +94,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testVMCF1() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.ConnectionFactory", "vm://1");
       Context ctx = new InitialContext(props);
@@ -106,7 +106,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testXACF() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "vm://0?type=XA_CF");
       Context ctx = new InitialContext(props);
@@ -118,7 +118,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testQueueCF() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "vm://0?type=QUEUE_CF");
       Context ctx = new InitialContext(props);
@@ -130,7 +130,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testQueueXACF() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "vm://0?type=QUEUE_XA_CF");
       Context ctx = new InitialContext(props);
@@ -142,7 +142,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testTopicCF() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "vm://0?type=TOPIC_CF");
       Context ctx = new InitialContext(props);
@@ -154,7 +154,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testTopicXACF() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "vm://0?type=TOPIC_XA_CF");
       Context ctx = new InitialContext(props);
@@ -166,7 +166,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithTCP() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "tcp://127.0.0.1:61616");
       Context ctx = new InitialContext(props);
@@ -178,7 +178,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithTCPandHA() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "tcp://127.0.0.1:61616?ha=true");
       Context ctx = new InitialContext(props);
@@ -190,7 +190,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithJGroups() throws Exception {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "jgroups://mychannelid?file=test-jgroups-file_ping.xml");
       Context ctx = new InitialContext(props);
@@ -201,7 +201,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithJgroupsWithTransportConfigFile() throws Exception {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory.class.getCanonicalName());
       props.put("connectionFactory.myConnectionFactory", "jgroups://testChannelName?file=test-jgroups-file_ping.xml&" +
          ActiveMQInitialContextFactory.REFRESH_TIMEOUT + "=5000&" +
@@ -221,7 +221,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithJgroupsWithTransportConfigProps() throws Exception {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
       props.put("connectionFactory.ConnectionFactory", "jgroups://testChannelName?properties=param=value&" +
          ActiveMQInitialContextFactory.REFRESH_TIMEOUT + "=5000&" +
@@ -243,7 +243,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithJgroupsWithTransportConfigNullProps() throws Exception {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
       props.put("connectionFactory.ConnectionFactory", "jgroups://testChannelName?" +
          ActiveMQInitialContextFactory.REFRESH_TIMEOUT + "=5000&" +
@@ -265,7 +265,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithUDP() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "udp://" + getUDPDiscoveryAddress() + ":" + getUDPDiscoveryPort());
       Context ctx = new InitialContext(props);
@@ -277,7 +277,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithUDPWithTransportConfig() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
       props.put("connectionFactory.myConnectionFactory", "udp://" + getUDPDiscoveryAddress() + ":" + getUDPDiscoveryPort() + "?" +
          TransportConstants.LOCAL_ADDRESS_PROP_NAME + "=Server1&" +
@@ -302,7 +302,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithMultipleHosts() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "tcp://127.0.0.1:61616/httpEnabled=true&foo=bar,tcp://127.0.0.2:61617?httpEnabled=false?clientID=myClientID");
       Context ctx = new InitialContext(props);
@@ -314,7 +314,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testRemoteCFWithTransportConfig() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("connectionFactory.myConnectionFactory", "tcp://127.0.0.1:61616?" +
          TransportConstants.SSL_ENABLED_PROP_NAME + "=mySSLEnabledPropValue&" +
@@ -350,7 +350,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
       ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
 
-      Map parametersFromJNDI = cf.getServerLocator().getStaticTransportConfigurations()[0].getParams();
+      Map<String, Object> parametersFromJNDI = cf.getServerLocator().getStaticTransportConfigurations()[0].getParams();
 
       Assert.assertEquals(parametersFromJNDI.get(TransportConstants.SSL_ENABLED_PROP_NAME), "mySSLEnabledPropValue");
       Assert.assertEquals(parametersFromJNDI.get(TransportConstants.HTTP_ENABLED_PROP_NAME), "myHTTPEnabledPropValue");
@@ -398,7 +398,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
       List<String> connectorNames = new ArrayList<>();
       connectorNames.add(liveTC.getName());
 
-      Map params = new HashMap();
+      Map<String, Object> params = new HashMap<>();
       params.put(org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, 1);
 
       Configuration liveConf = createBasicConfig().addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY)).addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY, params)).addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY)).setConnectorConfigurations(connectors).setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration());
@@ -421,7 +421,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testQueue() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("queue.myQueue", "myQueue");
       props.put("queue.queues/myQueue", "myQueue");
@@ -436,7 +436,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testDynamicQueue() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       Context ctx = new InitialContext(props);
 
@@ -446,7 +446,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testTopic() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       props.put("topic.myTopic", "myTopic");
       props.put("topic.topics/myTopic", "myTopic");
@@ -461,7 +461,7 @@ public class SimpleJNDIClientTest extends ActiveMQTestBase {
 
    @Test
    public void testDynamicTopic() throws NamingException, JMSException {
-      Hashtable props = new Hashtable<>();
+      Hashtable<String, String> props = new Hashtable<>();
       props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
       Context ctx = new InitialContext(props);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/jms2client/InvalidDestinationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/jms2client/InvalidDestinationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/jms2client/InvalidDestinationTest.java
index f2f0f38..40f7300 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/jms2client/InvalidDestinationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/jms2client/InvalidDestinationTest.java
@@ -54,7 +54,7 @@ public class InvalidDestinationTest extends JMSTestBase {
       Topic invalidTopic = null;
       String message = "hello world";
       byte[] bytesMsgSend = message.getBytes();
-      Map<String, Object> mapMsgSend = new HashMap();
+      Map<String, Object> mapMsgSend = new HashMap<>();
       mapMsgSend.put("s", "foo");
       mapMsgSend.put("b", true);
       mapMsgSend.put("i", 1);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java
index 9f6af78..662fef7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java
@@ -380,7 +380,7 @@ public class XmlImportExportTest extends ActiveMQTestBase {
       final String jndi_binding2 = name + "Binding2";
       final JMSFactoryType type = JMSFactoryType.CF;
       final boolean ha = true;
-      final List connectors = Arrays.asList("in-vm1", "in-vm2");
+      final List<String> connectors = Arrays.asList("in-vm1", "in-vm2");
 
       ClientSession session = basicSetUp();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7c275cdb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java
index d702fa0..25bff46 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java
@@ -41,7 +41,7 @@ public class ActiveMQRAClusteredTestBase extends ActiveMQRATestBase {
       super.setUp();
 
       primaryConnector = new TransportConfiguration(INVM_CONNECTOR_FACTORY);
-      HashMap<String, Object> params = new HashMap();
+      HashMap<String, Object> params = new HashMap<>();
       params.put(TransportConstants.SERVER_ID_PROP_NAME, "1");
       secondaryConnector = new TransportConfiguration(INVM_CONNECTOR_FACTORY, params);
 
@@ -59,8 +59,8 @@ public class ActiveMQRAClusteredTestBase extends ActiveMQRATestBase {
    }
 
    protected Configuration createSecondaryDefaultConfig(boolean secondary) throws Exception {
-      HashMap invmMap = new HashMap();
-      HashMap nettyMap = new HashMap();
+      HashMap<String, Object> invmMap = new HashMap<>();
+      HashMap<String, Object> nettyMap = new HashMap<>();
       String primaryConnectorName = "invm2";
       String secondaryConnectorName = "invm";
       int index = 0;


Mime
View raw message