Fix new Sonar smells

This commit is contained in:
Artem Bilan
2020-08-21 11:37:43 -04:00
parent 973276fc0a
commit 3fb6567a1f
3 changed files with 47 additions and 32 deletions

View File

@@ -248,18 +248,18 @@ public class RedisQueueInboundGateway extends MessagingGatewaySupport
}
Message<?> replyMessage = sendAndReceiveMessage(requestMessage);
if (replyMessage != null) {
byte[] replyPayload = null;
if (this.extractPayload) {
value = extractReplyPayload(replyMessage);
replyPayload = extractReplyPayload(replyMessage);
}
else {
if (this.serializer != null) {
value = ((RedisSerializer<Object>) this.serializer).serialize(replyMessage);
if (value == null) {
return;
}
replyPayload = ((RedisSerializer<Object>) this.serializer).serialize(replyMessage);
}
}
this.template.boundListOps(uuid + QUEUE_NAME_SUFFIX).leftPush(value);
if (replyPayload != null) {
this.template.boundListOps(uuid + QUEUE_NAME_SUFFIX).leftPush(replyPayload);
}
}
}