Address Sonar Issues

This commit is contained in:
Gary Russell
2022-11-01 14:41:07 -04:00
parent b9b205feff
commit e7d7244b30
5 changed files with 11 additions and 11 deletions

View File

@@ -130,7 +130,7 @@ public class StreamListenerContainer implements MessageListenerContainer, BeanNa
* @param consumers the number of consumers.
* @since 3.0
*/
public void superStream(String streamName, String name, int consumers) {
public synchronized void superStream(String streamName, String name, int consumers) {
Assert.isTrue(consumers > 0, () -> "'concurrency' must be greater than zero, not " + consumers);
this.concurrency = consumers;
Assert.isTrue(!this.simpleStream, "setQueueNames() and superStream() are mutually exclusive");

View File

@@ -110,7 +110,7 @@ public class RabbitStreamTemplate implements RabbitStreamOperations, BeanNameAwa
* @param superStreamRouting the routing function.
* @since 3.0
*/
public void setSuperStreamRouting(Function<com.rabbitmq.stream.Message, String> superStreamRouting) {
public synchronized void setSuperStreamRouting(Function<com.rabbitmq.stream.Message, String> superStreamRouting) {
this.superStreamRouting = superStreamRouting;
}

View File

@@ -1126,9 +1126,9 @@ public class RabbitListenerAnnotationBeanPostProcessor
}
TypeMetadata(ListenerMethod[] methods, Method[] multiMethods, RabbitListener[] classLevelListeners) { // NOSONAR
this.listenerMethods = methods;
this.handlerMethods = multiMethods;
this.classAnnotations = classLevelListeners;
this.listenerMethods = methods; // NOSONAR
this.handlerMethods = multiMethods; // NOSONAR
this.classAnnotations = classLevelListeners; // NOSONAR
}
}
@@ -1144,7 +1144,7 @@ public class RabbitListenerAnnotationBeanPostProcessor
ListenerMethod(Method method, RabbitListener[] annotations) { // NOSONAR
this.method = method;
this.annotations = annotations;
this.annotations = annotations; // NOSONAR
}
}

View File

@@ -77,7 +77,7 @@ public class BindingFactoryBean implements FactoryBean<Binding> {
}
public void setAdminsThatShouldDeclare(AmqpAdmin... admins) { // NOSONAR
this.adminsThatShouldDeclare = admins;
this.adminsThatShouldDeclare = admins; // NOSONAR
}
@Override

View File

@@ -212,11 +212,11 @@ public class ListenerContainerFactoryBean extends AbstractFactoryBean<AbstractMe
}
public void setQueueNames(String... queueName) { // NOSONAR
this.queueNames = queueName;
this.queueNames = queueName; // NOSONAR
}
public void setQueues(Queue... queues) { // NOSONAR
this.queues = queues;
this.queues = queues; // NOSONAR
}
public void setExposeListenerChannel(boolean exposeListenerChannel) {
@@ -236,11 +236,11 @@ public class ListenerContainerFactoryBean extends AbstractFactoryBean<AbstractMe
}
public void setAdviceChain(Advice... adviceChain) { // NOSONAR
this.adviceChain = adviceChain;
this.adviceChain = adviceChain; // NOSONAR
}
public void setAfterReceivePostProcessors(MessagePostProcessor... afterReceivePostProcessors) { // NOSONAR
this.afterReceivePostProcessors = afterReceivePostProcessors;
this.afterReceivePostProcessors = afterReceivePostProcessors; // NOSONAR
}
public void setAutoStartup(boolean autoStartup) {