diff --git a/spring-integration-core/src/main/java/org/springframework/integration/transformer/ContentEnricher.java b/spring-integration-core/src/main/java/org/springframework/integration/transformer/ContentEnricher.java index c35c93afe5..ab6e6e8330 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/transformer/ContentEnricher.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/transformer/ContentEnricher.java @@ -279,7 +279,9 @@ public class ContentEnricher extends AbstractReplyProducingMessageHandler implem } if (this.requestChannel != null || this.requestChannelName != null) { this.gateway = new Gateway(); - this.gateway.setRequestChannel(this.requestChannel); + if (this.requestChannel != null) { + this.gateway.setRequestChannel(this.requestChannel); + } if (this.requestChannelName != null) { this.gateway.setRequestChannelName(this.requestChannelName); } diff --git a/spring-integration-jms/src/main/java/org/springframework/integration/jms/JmsOutboundGateway.java b/spring-integration-jms/src/main/java/org/springframework/integration/jms/JmsOutboundGateway.java index aad7f7d650..57e5022d12 100644 --- a/spring-integration-jms/src/main/java/org/springframework/integration/jms/JmsOutboundGateway.java +++ b/spring-integration-jms/src/main/java/org/springframework/integration/jms/JmsOutboundGateway.java @@ -47,7 +47,6 @@ import org.apache.commons.logging.LogFactory; import org.springframework.context.Lifecycle; import org.springframework.core.convert.ConversionService; import org.springframework.expression.Expression; -import org.springframework.integration.IntegrationMessageHeaderAccessor; import org.springframework.integration.MessageTimeoutException; import org.springframework.integration.StaticMessageHeaderAccessor; import org.springframework.integration.handler.AbstractReplyProducingMessageHandler; @@ -294,9 +293,9 @@ public class JmsOutboundGateway extends AbstractReplyProducingMessageHandler imp } /** - * Specify the default JMS priority to use when sending request Messages with - * no {@link IntegrationMessageHeaderAccessor#PRIORITY} header. - * The value should be within the range of 0-9. + * Specify the default JMS priority to use when sending request Messages with no + * {@link org.springframework.integration.IntegrationMessageHeaderAccessor#PRIORITY} + * header. The value should be within the range of 0-9. * @param priority The priority. * @since 5.1.2 */ diff --git a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/outbound/ChatMessageSendingMessageHandler.java b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/outbound/ChatMessageSendingMessageHandler.java index a06294967e..5e57c4db5d 100644 --- a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/outbound/ChatMessageSendingMessageHandler.java +++ b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/outbound/ChatMessageSendingMessageHandler.java @@ -97,7 +97,7 @@ public class ChatMessageSendingMessageHandler extends AbstractXmppConnectionAwar else { String to = message.getHeaders().get(XmppHeaders.TO, String.class); Assert.state(StringUtils.hasText(to), () -> "The '" + XmppHeaders.TO + "' header must not be null"); - xmppMessage = buildXmppMessage(message, payload, to); + xmppMessage = buildXmppMessage(payload, to); } if (this.headerMapper != null) { @@ -118,7 +118,7 @@ public class ChatMessageSendingMessageHandler extends AbstractXmppConnectionAwar } } - private org.jivesoftware.smack.packet.Message buildXmppMessage(Message message, Object payload, String to) + private org.jivesoftware.smack.packet.Message buildXmppMessage(Object payload, String to) throws Exception { // NOSONAR Smack throws it org.jivesoftware.smack.packet.Message xmppMessage;