Skip to content

Commit 38b6454

Browse files
committed
Fix New Sonar Issues
1 parent 80d679a commit 38b6454

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

spring-integration-core/src/main/java/org/springframework/integration/transformer/ContentEnricher.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,9 @@ protected void doInit() {
279279
}
280280
if (this.requestChannel != null || this.requestChannelName != null) {
281281
this.gateway = new Gateway();
282-
this.gateway.setRequestChannel(this.requestChannel);
282+
if (this.requestChannel != null) {
283+
this.gateway.setRequestChannel(this.requestChannel);
284+
}
283285
if (this.requestChannelName != null) {
284286
this.gateway.setRequestChannelName(this.requestChannelName);
285287
}

spring-integration-jms/src/main/java/org/springframework/integration/jms/JmsOutboundGateway.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import org.springframework.context.Lifecycle;
4848
import org.springframework.core.convert.ConversionService;
4949
import org.springframework.expression.Expression;
50-
import org.springframework.integration.IntegrationMessageHeaderAccessor;
5150
import org.springframework.integration.MessageTimeoutException;
5251
import org.springframework.integration.StaticMessageHeaderAccessor;
5352
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
@@ -294,9 +293,9 @@ public void setReceiveTimeout(long receiveTimeout) {
294293
}
295294

296295
/**
297-
* Specify the default JMS priority to use when sending request Messages with
298-
* no {@link IntegrationMessageHeaderAccessor#PRIORITY} header.
299-
* The value should be within the range of 0-9.
296+
* Specify the default JMS priority to use when sending request Messages with no
297+
* {@link org.springframework.integration.IntegrationMessageHeaderAccessor#PRIORITY}
298+
* header. The value should be within the range of 0-9.
300299
* @param priority The priority.
301300
* @since 5.1.2
302301
*/

spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/outbound/ChatMessageSendingMessageHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected void handleMessageInternal(Message<?> message) {
9797
else {
9898
String to = message.getHeaders().get(XmppHeaders.TO, String.class);
9999
Assert.state(StringUtils.hasText(to), () -> "The '" + XmppHeaders.TO + "' header must not be null");
100-
xmppMessage = buildXmppMessage(message, payload, to);
100+
xmppMessage = buildXmppMessage(payload, to);
101101
}
102102

103103
if (this.headerMapper != null) {
@@ -118,7 +118,7 @@ protected void handleMessageInternal(Message<?> message) {
118118
}
119119
}
120120

121-
private org.jivesoftware.smack.packet.Message buildXmppMessage(Message<?> message, Object payload, String to)
121+
private org.jivesoftware.smack.packet.Message buildXmppMessage(Object payload, String to)
122122
throws Exception { // NOSONAR Smack throws it
123123

124124
org.jivesoftware.smack.packet.Message xmppMessage;

0 commit comments

Comments
 (0)