Fix New Sonar Issues
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user