Suppress Sonar Critical Violations

2 "violations" are ok.
This commit is contained in:
Gary Russell
2015-07-08 11:41:07 -04:00
parent 1f900edf37
commit 5a9b898635
2 changed files with 5 additions and 5 deletions

View File

@@ -38,9 +38,9 @@ import org.springframework.messaging.core.GenericMessagingTemplate;
public class MessagingTemplate extends GenericMessagingTemplate {
private BeanFactory beanFactory;
private volatile boolean throwExceptionOnLateReplySet;
/**
* Create a MessagingTemplate with no default channel. Note, that one
* may be provided by invoking {@link #setDefaultChannel(MessageChannel)}.
@@ -61,7 +61,7 @@ public class MessagingTemplate extends GenericMessagingTemplate {
*/
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
this.beanFactory = beanFactory;
this.beanFactory = beanFactory;//NOSONAR - non-sync is ok here
super.setDestinationResolver(new BeanFactoryChannelResolver(beanFactory));
}
@@ -85,7 +85,7 @@ public class MessagingTemplate extends GenericMessagingTemplate {
if (!this.throwExceptionOnLateReplySet) {
synchronized (this) {
if (!this.throwExceptionOnLateReplySet) {
Properties integrationProperties =
Properties integrationProperties =
IntegrationContextUtils.getIntegrationProperties(this.beanFactory);
Boolean throwExceptionOnLateReply = Boolean.valueOf(integrationProperties
.getProperty(IntegrationProperties.THROW_EXCEPTION_ON_LATE_REPLY));

View File

@@ -129,7 +129,7 @@ public class ExponentialMovingAverage {
double mean = weight > 0 ? sum / weight : 0.;
double var = weight > 0 ? sumSquares / weight - mean * mean : 0.;
double standardDeviation = var > 0 ? Math.sqrt(var) : 0;
return new Statistics(count, min == Double.MAX_VALUE ? 0 : min, max, mean, standardDeviation);
return new Statistics(count, min == Double.MAX_VALUE ? 0 : min, max, mean, standardDeviation);//NOSONAR
}
/**