activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/4] activemq-artemis git commit: Remove redundant type arguments
Date Wed, 15 Jun 2016 00:55:27 GMT
Remove redundant type arguments


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

Branch: refs/heads/master
Commit: 33a51223b075b7e34fd851fe3a86b15a99287920
Parents: 560ba1b
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Tue Jun 14 00:20:31 2016 +0300
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Jun 14 20:50:21 2016 -0400

----------------------------------------------------------------------
 .../apache/activemq/artemis/utils/uri/URISupport.java   |  2 +-
 .../apache/activemq/artemis/utils/URIParserTest.java    |  2 +-
 .../artemis/jdbc/store/journal/TransactionHolder.java   |  4 ++--
 .../jdbc/file/JDBCSequentialFileFactoryTest.java        |  2 +-
 .../message/JMSMappingOutboundTransformer.java          | 12 ++++++------
 .../core/protocol/openwire/OpenWireProtocolManager.java |  2 +-
 .../core/deployers/impl/FileConfigurationParser.java    |  4 ++--
 .../core/paging/cursor/impl/LivePageCacheImpl.java      |  2 +-
 .../core/paging/cursor/impl/PageCursorProviderImpl.java |  4 ++--
 .../spi/core/security/ActiveMQJAASSecurityManager.java  |  2 +-
 .../artemis/tests/util/ThreadLeakCheckRule.java         |  2 +-
 .../jms/example/ldap/InMemorySchemaPartition.java       |  2 +-
 .../tests/integration/karaf/ArtemisFeatureTest.java     |  6 +++---
 13 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
index d03f2f0..b850de9 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
@@ -474,7 +474,7 @@ public class URISupport {
          if (options.size() > 0) {
             StringBuilder rc = new StringBuilder();
             boolean first = true;
-            List<String> keys = new ArrayList<String>();
+            List<String> keys = new ArrayList<>();
             keys.addAll(options.keySet());
             Collections.sort(keys);
             for (String key : keys) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
index d4e9950..5a22405 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
@@ -104,7 +104,7 @@ public class URIParserTest {
 
    @Test
    public void testQueryConversion() throws Exception {
-      Map<String, String> query = new HashMap<String, String>();
+      Map<String, String> query = new HashMap<>();
       String queryString = URISupport.createQueryString(query);
       System.out.println("queryString1: " + queryString);
       Assert.assertTrue(queryString.isEmpty());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/TransactionHolder.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/TransactionHolder.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/TransactionHolder.java
index 348c823..12c0d59 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/TransactionHolder.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/TransactionHolder.java
@@ -30,9 +30,9 @@ final class TransactionHolder {
 
    public final long transactionID;
 
-   public final List<RecordInfo> recordInfos = new ArrayList<RecordInfo>();
+   public final List<RecordInfo> recordInfos = new ArrayList<>();
 
-   public final List<RecordInfo> recordsToDelete = new ArrayList<RecordInfo>();
+   public final List<RecordInfo> recordsToDelete = new ArrayList<>();
 
    public boolean prepared;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/file/JDBCSequentialFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/file/JDBCSequentialFileFactoryTest.java
b/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/file/JDBCSequentialFileFactoryTest.java
index 5f7d7e6..2bdd729 100644
--- a/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/file/JDBCSequentialFileFactoryTest.java
+++ b/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/file/JDBCSequentialFileFactoryTest.java
@@ -75,7 +75,7 @@ public class JDBCSequentialFileFactoryTest {
    @Test
    public void testCreateFiles() throws Exception {
       int noFiles = 100;
-      Set<String> fileNames = new HashSet<String>();
+      Set<String> fileNames = new HashSet<>();
       for (int i = 0; i < noFiles; i++) {
          String fileName = UUID.randomUUID().toString() + ".txt";
          fileNames.add(fileName);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/message/JMSMappingOutboundTransformer.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/message/JMSMappingOutboundTransformer.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/message/JMSMappingOutboundTransformer.java
index 715faaa..cc3c2ac 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/message/JMSMappingOutboundTransformer.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/message/JMSMappingOutboundTransformer.java
@@ -107,7 +107,7 @@ public class JMSMappingOutboundTransformer extends OutboundTransformer
{
          body = new AmqpValue(((TextMessage) msg).getText());
       }
       if (msg instanceof MapMessage) {
-         final HashMap<String, Object> map = new HashMap<String, Object>();
+         final HashMap<String, Object> map = new HashMap<>();
          final MapMessage m = (MapMessage) msg;
          final Enumeration<String> names = m.getMapNames();
          while (names.hasMoreElements()) {
@@ -117,7 +117,7 @@ public class JMSMappingOutboundTransformer extends OutboundTransformer
{
          body = new AmqpValue(map);
       }
       if (msg instanceof StreamMessage) {
-         ArrayList<Object> list = new ArrayList<Object>();
+         ArrayList<Object> list = new ArrayList<>();
          final StreamMessage m = (StreamMessage) msg;
          try {
             while (true) {
@@ -163,7 +163,7 @@ public class JMSMappingOutboundTransformer extends OutboundTransformer
{
       if (msg.getJMSDestination() != null) {
          props.setTo(vendor.toAddress(msg.getJMSDestination()));
          if (maMap == null) {
-            maMap = new HashMap<Symbol, Object>();
+            maMap = new HashMap<>();
          }
          maMap.put(JMS_DEST_TYPE_MSG_ANNOTATION, destinationType(msg.getJMSDestination()));
 
@@ -173,7 +173,7 @@ public class JMSMappingOutboundTransformer extends OutboundTransformer
{
       if (msg.getJMSReplyTo() != null) {
          props.setReplyTo(vendor.toAddress(msg.getJMSReplyTo()));
          if (maMap == null) {
-            maMap = new HashMap<Symbol, Object>();
+            maMap = new HashMap<>();
          }
          maMap.put(JMS_REPLY_TO_TYPE_MSG_ANNOTATION, destinationType(msg.getJMSReplyTo()));
 
@@ -235,14 +235,14 @@ public class JMSMappingOutboundTransformer extends OutboundTransformer
{
          }
          else if (key.startsWith(prefixDeliveryAnnotationsKey)) {
             if (daMap == null) {
-               daMap = new HashMap<Symbol, Object>();
+               daMap = new HashMap<>();
             }
             String name = key.substring(prefixDeliveryAnnotationsKey.length());
             daMap.put(Symbol.valueOf(name), msg.getObjectProperty(key));
          }
          else if (key.startsWith(prefixMessageAnnotationsKey)) {
             if (maMap == null) {
-               maMap = new HashMap<Symbol, Object>();
+               maMap = new HashMap<>();
             }
             String name = key.substring(prefixMessageAnnotationsKey.length());
             maMap.put(Symbol.valueOf(name), msg.getObjectProperty(key));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
index b08d26c..b91a4e4 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
@@ -90,7 +90,7 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>,
Cl
 
    private final CopyOnWriteArrayList<OpenWireConnection> connections = new CopyOnWriteArrayList<>();
 
-   private final Map<String, AMQConnectionContext> clientIdSet = new HashMap<String,
AMQConnectionContext>();
+   private final Map<String, AMQConnectionContext> clientIdSet = new HashMap<>();
 
    private String brokerName;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index b058aed..b6e1c7b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -620,9 +620,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
{
    protected Pair<String, Set<Role>> parseSecurityRoles(final Node node) {
       final String match = node.getAttributes().getNamedItem("match").getNodeValue();
 
-      HashSet<Role> securityRoles = new HashSet<>();
+      Set<Role> securityRoles = new HashSet<>();
 
-      Pair<String, Set<Role>> securityMatch = new Pair<String, Set<Role>>(match,
securityRoles);
+      Pair<String, Set<Role>> securityMatch = new Pair<>(match, securityRoles);
 
       ArrayList<String> send = new ArrayList<>();
       ArrayList<String> consume = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/LivePageCacheImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/LivePageCacheImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/LivePageCacheImpl.java
index b964b56..0d63cf0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/LivePageCacheImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/LivePageCacheImpl.java
@@ -32,7 +32,7 @@ public class LivePageCacheImpl implements LivePageCache {
 
    private static final Logger logger = Logger.getLogger(LivePageCacheImpl.class);
 
-   private final List<PagedMessage> messages = new LinkedList<PagedMessage>();
+   private final List<PagedMessage> messages = new LinkedList<>();
 
    private final Page page;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
index 4f3a6a5..b7c3e2e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
@@ -72,7 +72,7 @@ public class PageCursorProviderImpl implements PageCursorProvider {
 
    private final SoftValueHashMap<Long, PageCache> softCache;
 
-   private final ConcurrentMap<Long, PageSubscription> activeCursors = new ConcurrentHashMap<Long,
PageSubscription>();
+   private final ConcurrentMap<Long, PageSubscription> activeCursors = new ConcurrentHashMap<>();
 
    // Static --------------------------------------------------------
 
@@ -345,7 +345,7 @@ public class PageCursorProviderImpl implements PageCursorProvider {
 
       logger.tracef("performing page cleanup %s", this);
 
-      ArrayList<Page> depagedPages = new ArrayList<Page>();
+      ArrayList<Page> depagedPages = new ArrayList<>();
 
       while (true) {
          if (pagingStore.lock(100)) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
index ad2a995..6e28e91 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
@@ -116,7 +116,7 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager2
{
          Set<RolePrincipal> rolesWithPermission = getPrincipalsInRole(checkType, roles);
 
          // Check the caller's roles
-         Set<Principal> rolesForSubject = new HashSet<Principal>();
+         Set<Principal> rolesForSubject = new HashSet<>();
          try {
             rolesForSubject.addAll(localSubject.getPrincipals(Class.forName(rolePrincipalClass).asSubclass(Principal.class)));
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ThreadLeakCheckRule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ThreadLeakCheckRule.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ThreadLeakCheckRule.java
index fa881d5..f7236e5 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ThreadLeakCheckRule.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ThreadLeakCheckRule.java
@@ -28,7 +28,7 @@ import org.junit.rules.ExternalResource;
  * This is useful to make sure you won't have leaking threads between tests
  */
 public class ThreadLeakCheckRule extends ExternalResource {
-   private static Set<String> knownThreads = new HashSet<String>();
+   private static Set<String> knownThreads = new HashSet<>();
 
    boolean enabled = true;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemorySchemaPartition.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemorySchemaPartition.java
b/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemorySchemaPartition.java
index b7bb1f7..f7ec24d 100644
--- a/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemorySchemaPartition.java
+++ b/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemorySchemaPartition.java
@@ -71,7 +71,7 @@ public class InMemorySchemaPartition extends AbstractLdifPartition {
 
       // load schema
       final Map<String, Boolean> resMap = ResourceMap.getResources(Pattern.compile("schema[/\\Q\\\\E]ou=schema.*"));
-      for (String resourcePath : new TreeSet<String>(resMap.keySet())) {
+      for (String resourcePath : new TreeSet<>(resMap.keySet())) {
          if (resourcePath.endsWith(".ldif")) {
             URL resource = DefaultSchemaLdifExtractor.getUniqueResource(resourcePath, "Schema
LDIF file");
             LdifReader reader = new LdifReader(resource.openStream());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/33a51223/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
index 134dd9a..64d7065 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
@@ -96,7 +96,7 @@ public class ArtemisFeatureTest extends Assert {
 
    public static Option[] configure(String... features) {
 
-      ArrayList<String> f = new ArrayList<String>();
+      ArrayList<String> f = new ArrayList<>();
       f.addAll(Arrays.asList(features));
 
       Option[] options =
@@ -169,7 +169,7 @@ public class ArtemisFeatureTest extends Assert {
       final Session commandSession = sessionFactory.create(System.in, printStream, printStream);
       commandSession.put("APPLICATION", System.getProperty("karaf.name", "root"));
       commandSession.put("USER", USER);
-      FutureTask<String> commandFuture = new FutureTask<String>(
+      FutureTask<String> commandFuture = new FutureTask<>(
             new Callable<String>() {
                @Override
                public String call() {
@@ -246,7 +246,7 @@ public class ArtemisFeatureTest extends Assert {
    }
 
    protected Object waitForService(String filter, long timeout) throws InvalidSyntaxException,
InterruptedException {
-      ServiceTracker<Object, Object> st = new ServiceTracker<Object, Object>(bundleContext,
bundleContext.createFilter(filter), null);
+      ServiceTracker<Object, Object> st = new ServiceTracker<>(bundleContext,
bundleContext.createFilter(filter), null);
       try {
          st.open();
          return st.waitForService(timeout);


Mime
View raw message