Polishing Map initialization in new code

Resolves #255
This commit is contained in:
Oleg Zhurakousky
2019-07-08 17:47:24 +02:00
parent fe09a8bcbe
commit 43d2a9caa1

View File

@@ -292,8 +292,7 @@ public class RabbitExchangeQueueProvisioner
if (routingKey == null) {
routingKey = "#";
}
Map<String, Object> arguments = new HashMap<>();
arguments.putAll(extendedProperties.getQueueBindingArguments());
Map<String, Object> arguments = new HashMap<>(extendedProperties.getQueueBindingArguments());
if (exchange instanceof TopicExchange) {
Binding binding = BindingBuilder.bind(queue).to((TopicExchange) exchange)
.with(routingKey);
@@ -355,8 +354,7 @@ public class RabbitExchangeQueueProvisioner
properties.getDeadLetterExchangeType()).durable(true)
.build());
}
Map<String, Object> arguments = new HashMap<>();
arguments.putAll(properties.getDlqBindingArguments());
Map<String, Object> arguments = new HashMap<>(properties.getDlqBindingArguments());
Binding dlqBinding = new Binding(dlq.getName(), DestinationType.QUEUE,
dlxName, properties.getDlqDeadLetterRoutingKey() == null ? routingKey
: properties.getDeadLetterRoutingKey(),