This is an automated email from the ASF dual-hosted git repository.

vavrtom pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git


The following commit(s) were added to refs/heads/main by this push:
     new f82a993936 QPID-8653: [Broker-J] Code cleanup: collection type 
arguments, collection factory methods, lambdas (#202)
f82a993936 is described below

commit f82a993936efc1d3039ffa4cb8277c7d22962805
Author: Daniil Kirilyuk <daniel.kiril...@gmail.com>
AuthorDate: Mon Aug 7 10:03:06 2023 +0200

    QPID-8653: [Broker-J] Code cleanup: collection type arguments, collection 
factory methods, lambdas (#202)
---
 tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java    | 5 ++---
 .../main/java/org/apache/qpid/tools/MemoryConsumptionTestClient.java | 4 +---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java 
b/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java
index 48f13ad17a..cf709be830 100644
--- a/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java
+++ b/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java
@@ -23,7 +23,6 @@ package org.apache.qpid.tck;
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -131,7 +130,7 @@ public class ManageQpidJMSResources
                 NodeType type = 
NodeType.valueOf(String.valueOf(resourceDef.get("nodeType")));
                 Map<String, Object> arguments =
                         resourceDef.containsKey("arguments") ? (Map<String, 
Object>) resourceDef.get("arguments")
-                                : Collections.<String, Object>emptyMap();
+                                : Map.of();
                 LOGGER.info("Creating {} type {}", name, type);
                 switch (type)
                 {
@@ -193,7 +192,7 @@ public class ManageQpidJMSResources
     {
         HttpPost post = new HttpPost(String.format(_queueApiClearQueueUrl, 
_virtualhostnode, _virtualhost, name));
 
-        management(post, Collections.emptyMap());
+        management(post, Map.of());
     }
 
     private void managementCreateExchange(final String name, final Map<String, 
Object> arguments) throws IOException
diff --git 
a/tools/src/main/java/org/apache/qpid/tools/MemoryConsumptionTestClient.java 
b/tools/src/main/java/org/apache/qpid/tools/MemoryConsumptionTestClient.java
index 569c9f0ac6..1286b78cc8 100644
--- a/tools/src/main/java/org/apache/qpid/tools/MemoryConsumptionTestClient.java
+++ b/tools/src/main/java/org/apache/qpid/tools/MemoryConsumptionTestClient.java
@@ -25,7 +25,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -62,7 +61,6 @@ import javax.naming.NamingException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
 public class MemoryConsumptionTestClient
 {
     private static final Logger LOGGER = 
LoggerFactory.getLogger(MemoryConsumptionTestClient.class);
@@ -361,7 +359,7 @@ public class MemoryConsumptionTestClient
 
         if (!"".equals(host) && !"".equals(port) && !"".equals(user) && 
!"".equals(password))
         {
-            Map<String, Object> environment = Collections.<String, 
Object>singletonMap(JMXConnector.CREDENTIALS, new String[]{user, password});
+            Map<String, Object> environment = Map.of(JMXConnector.CREDENTIALS, 
new String[]{user, password});
 
             try(JMXConnector jmxConnector = 
JMXConnectorFactory.newJMXConnector(new JMXServiceURL("rmi", "", 0, 
"/jndi/rmi://" + host + ":" + port + "/jmxrmi"), environment))
             {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to