Sonar fixes
- remaining hidden fields * Fix copyright
This commit is contained in:
committed by
Artem Bilan
parent
e30741f7eb
commit
2766707547
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -214,16 +214,14 @@ public class SubscribableRedisChannel extends AbstractMessageChannel
|
||||
SubscribableRedisChannel.this.dispatcher.dispatch(siMessage);
|
||||
}
|
||||
catch (MessageDispatchingException e) {
|
||||
String topicName =
|
||||
StringUtils.hasText(SubscribableRedisChannel.this.topicName)
|
||||
? SubscribableRedisChannel.this.topicName
|
||||
: "unknown";
|
||||
String exceptionMessage = e.getMessage();
|
||||
throw new MessageDeliveryException(siMessage,
|
||||
(exceptionMessage == null ? e.getClass().getSimpleName() : exceptionMessage)
|
||||
+ " for redis-channel '"
|
||||
+ topicName
|
||||
+ "' (" + getFullChannelName() + ").", e); // NOSONAR false - never null
|
||||
+ (StringUtils.hasText(SubscribableRedisChannel.this.topicName)
|
||||
? SubscribableRedisChannel.this.topicName
|
||||
: "unknown")
|
||||
+ "' (" + getFullChannelName() + ").", e); // NOSONAR false positive - never null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,6 +34,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
* @since 4.0
|
||||
*/
|
||||
public class ExpressionArgumentsStrategy implements ArgumentsStrategy, BeanFactoryAware, InitializingBean {
|
||||
@@ -81,16 +82,16 @@ public class ExpressionArgumentsStrategy implements ArgumentsStrategy, BeanFacto
|
||||
|
||||
@Override
|
||||
public Object[] resolve(String command, Message<?> message) {
|
||||
EvaluationContext evaluationContext = this.evaluationContext;
|
||||
EvaluationContext evaluationContextToUse = this.evaluationContext;
|
||||
|
||||
if (this.useCommandVariable) {
|
||||
evaluationContext = IntegrationContextUtils.getEvaluationContext(this.beanFactory);
|
||||
evaluationContext.setVariable("cmd", command);
|
||||
evaluationContextToUse = IntegrationContextUtils.getEvaluationContext(this.beanFactory);
|
||||
evaluationContextToUse.setVariable("cmd", command);
|
||||
}
|
||||
|
||||
List<Object> arguments = new ArrayList<Object>();
|
||||
for (Expression argumentExpression : this.argumentExpressions) {
|
||||
Object argument = argumentExpression.getValue(evaluationContext, message);
|
||||
Object argument = argumentExpression.getValue(evaluationContextToUse, message);
|
||||
if (argument != null) {
|
||||
arguments.add(argument);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user