checkstyle Misc Rules

checkstyle Nesting

checkstyle GenericWhitespace

checkstyle MethodParamPad

checkstyle NoWhiteSpace

checkstyle ParenPad Script

checkstyle ParenPad
This commit is contained in:
Gary Russell
2016-04-05 14:58:29 -04:00
committed by Artem Bilan
parent 05cc7be644
commit 57f96bb759
87 changed files with 737 additions and 628 deletions

View File

@@ -234,17 +234,7 @@ public class RedisQueueInboundGateway extends MessagingGatewaySupport implements
Message<?> replyMessage = this.sendAndReceiveMessage(requestMessage);
if (replyMessage != null) {
if (this.extractPayload) {
if (!(replyMessage.getPayload() instanceof byte[])) {
if (replyMessage.getPayload() instanceof String && !this.serializerExplicitlySet) {
value = stringSerializer.serialize((String) replyMessage.getPayload());
}
else {
value = ((RedisSerializer<Object>) this.serializer).serialize(replyMessage.getPayload());
}
}
else {
value = (byte[]) replyMessage.getPayload();
}
value = extractReplyPayload(replyMessage);
}
else {
if (this.serializer != null) {
@@ -257,6 +247,23 @@ public class RedisQueueInboundGateway extends MessagingGatewaySupport implements
}
}
@SuppressWarnings("unchecked")
private byte[] extractReplyPayload(Message<?> replyMessage) {
byte[] value;
if (!(replyMessage.getPayload() instanceof byte[])) {
if (replyMessage.getPayload() instanceof String && !this.serializerExplicitlySet) {
value = stringSerializer.serialize((String) replyMessage.getPayload());
}
else {
value = ((RedisSerializer<Object>) this.serializer).serialize(replyMessage.getPayload());
}
}
else {
value = (byte[]) replyMessage.getPayload();
}
return value;
}
@Override
protected void doStart() {
super.doStart();