Fix New Sonar Issues

This commit is contained in:
Gary Russell
2019-07-24 09:08:43 -04:00
parent 80d679a9b0
commit 38b64543fb
3 changed files with 8 additions and 7 deletions

View File

@@ -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);
}