Fix Checkstyle violations

https://build.spring.io/browse/INT-SI43X-192/
This commit is contained in:
Artem Bilan
2017-08-15 13:09:31 -04:00
parent 9f79bc9927
commit a4992da074
2 changed files with 11 additions and 8 deletions

View File

@@ -310,14 +310,14 @@ public abstract class AbstractAmqpOutboundEndpoint extends AbstractReplyProducin
protected MessageChannel getConfirmAckChannel() {
if (this.confirmAckChannel == null && this.confirmAckChannelName != null) {
this.confirmAckChannel = getChannelResolver().resolveDestination(confirmAckChannelName);
this.confirmAckChannel = getChannelResolver().resolveDestination(this.confirmAckChannelName);
}
return this.confirmAckChannel;
}
protected MessageChannel getConfirmNackChannel() {
if (this.confirmNackChannel == null && this.confirmNackChannelName != null) {
this.confirmNackChannel = getChannelResolver().resolveDestination(confirmNackChannelName);
this.confirmNackChannel = getChannelResolver().resolveDestination(this.confirmNackChannelName);
}
return this.confirmNackChannel;
}

View File

@@ -43,15 +43,18 @@ public class AmqpMessageHeaderErrorMessageStrategy implements ErrorMessageStrate
public static final String AMQP_RAW_MESSAGE = AmqpHeaders.PREFIX + "raw_message";
@Override
@SuppressWarnings("deprecation")
public ErrorMessage buildErrorMessage(Throwable throwable, AttributeAccessor context) {
Object inputMessage = context == null ? null
Object inputMessage = context == null
? null
: context.getAttribute(ErrorMessageUtils.INPUT_MESSAGE_CONTEXT_KEY);
Map<String, Object> headers = Collections.singletonMap(
AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE,
context.getAttribute(AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE));
Map<String, Object> headers = context == null
? new HashMap<String, Object>()
: Collections.singletonMap(AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE,
context.getAttribute(AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE));
return inputMessage instanceof Message
? new org.springframework.integration.message.EnhancedErrorMessage(throwable, headers,
(Message<?>) inputMessage)
? new org.springframework.integration.message.EnhancedErrorMessage(throwable, headers, (Message<?>) inputMessage)
: new ErrorMessage(throwable, headers);
}