Skip to content

Commit 5a9b898

Browse files
committed
Suppress Sonar Critical Violations
2 "violations" are ok.
1 parent 1f900ed commit 5a9b898

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-integration-core/src/main/java/org/springframework/integration/core/MessagingTemplate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
public class MessagingTemplate extends GenericMessagingTemplate {
3939

4040
private BeanFactory beanFactory;
41-
41+
4242
private volatile boolean throwExceptionOnLateReplySet;
43-
43+
4444
/**
4545
* Create a MessagingTemplate with no default channel. Note, that one
4646
* may be provided by invoking {@link #setDefaultChannel(MessageChannel)}.
@@ -61,7 +61,7 @@ public MessagingTemplate(MessageChannel defaultChannel) {
6161
*/
6262
@Override
6363
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
64-
this.beanFactory = beanFactory;
64+
this.beanFactory = beanFactory;//NOSONAR - non-sync is ok here
6565
super.setDestinationResolver(new BeanFactoryChannelResolver(beanFactory));
6666
}
6767

@@ -85,7 +85,7 @@ public Message<?> sendAndReceive(MessageChannel destination, Message<?> requestM
8585
if (!this.throwExceptionOnLateReplySet) {
8686
synchronized (this) {
8787
if (!this.throwExceptionOnLateReplySet) {
88-
Properties integrationProperties =
88+
Properties integrationProperties =
8989
IntegrationContextUtils.getIntegrationProperties(this.beanFactory);
9090
Boolean throwExceptionOnLateReply = Boolean.valueOf(integrationProperties
9191
.getProperty(IntegrationProperties.THROW_EXCEPTION_ON_LATE_REPLY));

spring-integration-core/src/main/java/org/springframework/integration/support/management/ExponentialMovingAverage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private Statistics calc() {
129129
double mean = weight > 0 ? sum / weight : 0.;
130130
double var = weight > 0 ? sumSquares / weight - mean * mean : 0.;
131131
double standardDeviation = var > 0 ? Math.sqrt(var) : 0;
132-
return new Statistics(count, min == Double.MAX_VALUE ? 0 : min, max, mean, standardDeviation);
132+
return new Statistics(count, min == Double.MAX_VALUE ? 0 : min, max, mean, standardDeviation);//NOSONAR
133133
}
134134

135135
/**

0 commit comments

Comments
 (0)