+ update return signature for jedis exec
This commit is contained in:
@@ -116,7 +116,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
|
||||
return delegate.echo(message);
|
||||
}
|
||||
|
||||
public List<Object> exec() {
|
||||
public List<byte[]> exec() {
|
||||
return delegate.exec();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface RedisTxCommands {
|
||||
|
||||
void multi();
|
||||
|
||||
List<Object> exec();
|
||||
List<byte[]> exec();
|
||||
|
||||
void discard();
|
||||
|
||||
|
||||
@@ -511,14 +511,19 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Object> exec() {
|
||||
public List<byte[]> exec() {
|
||||
try {
|
||||
if (isPipelined()) {
|
||||
pipeline.exec();
|
||||
return null;
|
||||
}
|
||||
return transaction.exec();
|
||||
List execute = transaction.exec();
|
||||
if (execute != null && !execute.isEmpty()) {
|
||||
return (List<byte[]>) execute;
|
||||
}
|
||||
return Collections.emptyList();
|
||||
} catch (Exception ex) {
|
||||
throw convertJedisAccessException(ex);
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ public class JredisConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Object> exec() {
|
||||
public List<byte[]> exec() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user