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 7b0d54de48 QPID-8653: [Broker-J] Code cleanup: collection type
arguments, collection factory methods, lambdas (#213)
7b0d54de48 is described below
commit 7b0d54de487074c3db41c91cafd8dc09380152a9
Author: Daniil Kirilyuk <[email protected]>
AuthorDate: Mon Aug 7 13:00:40 2023 +0200
QPID-8653: [Broker-J] Code cleanup: collection type arguments, collection
factory methods, lambdas (#213)
---
.../qpid/server/security/access/config/RuleBasedAccessControl.java | 3 +--
.../security/access/plugins/AclFileAccessControlProviderImpl.java | 3 +--
.../logging/logback/validator/TestConfiguredObjectFactory.java | 7 ++++---
.../logging/logback/validator/TestConfiguredObjectTypeFactory.java | 2 +-
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git
a/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleBasedAccessControl.java
b/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleBasedAccessControl.java
index ed6427b224..7a8bfbdd54 100644
---
a/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleBasedAccessControl.java
+++
b/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleBasedAccessControl.java
@@ -21,7 +21,6 @@
package org.apache.qpid.server.security.access.config;
import java.security.AccessController;
-import java.util.Collections;
import java.util.Map;
import javax.security.auth.Subject;
@@ -104,7 +103,7 @@ public class RuleBasedAccessControl implements
AccessControl<CachingSecurityToke
final Operation operation,
final PermissionedObject configuredObject)
{
- return authorise(token, operation, configuredObject,
Collections.<String,Object>emptyMap());
+ return authorise(token, operation, configuredObject, Map.of());
}
@Override
diff --git
a/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AclFileAccessControlProviderImpl.java
b/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AclFileAccessControlProviderImpl.java
index 0a80b812ed..5cb8a441d9 100644
---
a/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AclFileAccessControlProviderImpl.java
+++
b/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AclFileAccessControlProviderImpl.java
@@ -20,7 +20,6 @@
*/
package org.apache.qpid.server.security.access.plugins;
-import java.util.Collections;
import java.util.Map;
import org.apache.qpid.server.logging.messages.AccessControlMessages;
@@ -86,7 +85,7 @@ public class AclFileAccessControlProviderImpl
recreateAccessController();
LOGGER.debug("Calling changeAttributes to try to force update");
// force the change listener to fire, causing the parent broker to
update its cache
- changeAttributes(Collections.<String,Object>emptyMap());
+ changeAttributes(Map.of());
getEventLogger().message(AccessControlMessages.LOADED(StringUtil.elideDataUrl(getPath())));
}
diff --git
a/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectFactory.java
b/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectFactory.java
index 9bce7ec513..a4a68acb66 100644
---
a/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectFactory.java
+++
b/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectFactory.java
@@ -31,8 +31,9 @@ import org.apache.qpid.server.store.ConfiguredObjectRecord;
import org.apache.qpid.server.store.UnresolvedConfiguredObject;
import java.util.Collection;
-import java.util.Collections;
+import java.util.List;
import java.util.Map;
+import java.util.Set;
public class TestConfiguredObjectFactory implements ConfiguredObjectFactory
{
@@ -88,9 +89,9 @@ public class TestConfiguredObjectFactory implements
ConfiguredObjectFactory
{
if (TestConfiguredObject.class.equals(category))
{
- return Collections.singleton(TestConfiguredObject.TYPE);
+ return Set.of(TestConfiguredObject.TYPE);
}
- return Collections.emptyList();
+ return List.of();
}
@Override
diff --git
a/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectTypeFactory.java
b/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectTypeFactory.java
index 9a08d09dee..80e6294972 100644
---
a/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectTypeFactory.java
+++
b/broker-plugins/graylog-logging-logback/src/test/java/org/apache/qpid/server/logging/logback/validator/TestConfiguredObjectTypeFactory.java
@@ -59,7 +59,7 @@ public class TestConfiguredObjectTypeFactory implements
ConfiguredObjectTypeFact
@Override
public UnresolvedConfiguredObject<TestConfiguredObject> recover(final
ConfiguredObjectFactory factory, final ConfiguredObjectRecord record, final
ConfiguredObject<?> parent)
{
- return new UnresolvedConfiguredObject<TestConfiguredObject>()
+ return new UnresolvedConfiguredObject<>()
{
@Override
public ConfiguredObject<?> getParent()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]