-
Notifications
You must be signed in to change notification settings - Fork 518
Open
Description
SessionCallback<List<Object>> obj;
public void method() throws TransactionException {
StringRedisTemplate stringRedisTemplate = resourcePool.template();
var res = obj.execute(stringRedisTemplate);// @Nullable <K, V> T execute(RedisOperations<K, V> operations) throws DataAccessException;
if (res == null) {
System.out.println("Direct execution is not Dead Code");
}
List<Object> results = stringRedisTemplate.execute(new SessionCallback<List<Object>>() {
@Override
@Nullable
public <K, V> List<Object> execute(@NonNull RedisOperations<K, V> operations) throws DataAccessException {
operations.multi();
return null;
}
});
// @Override public <T> T StringRedisTemplate::execute(SessionCallback<T> session) {
// ...
// try {
// return session.execute(this); -> this is NullAble
// } finally {
// RedisConnectionUtils.unbindConnection(factory);
// }
// }
if (results == null) {
throw new TransactionException("Transaction failed, please retry") {
};
}
}
Minimal reproduce repo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels