DATAREDIS-791 - Polishing.
Migrate tests to use StepVerifier instead of block(). Simplify isUpsert() comparison. Original Pull Request: #325
This commit is contained in:
committed by
Christoph Strobl
parent
2902d3fb4a
commit
7e3ba99e29
@@ -34,7 +34,6 @@ import org.springframework.data.redis.connection.ReactiveRedisConnection.KeyComm
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection.MultiValueResponse;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection.NumericResponse;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* @author Christoph Strobl
|
||||
@@ -74,7 +73,7 @@ class LettuceReactiveHashCommands implements ReactiveHashCommands {
|
||||
|
||||
Entry<ByteBuffer, ByteBuffer> entry = command.getFieldValueMap().entrySet().iterator().next();
|
||||
|
||||
result = ObjectUtils.nullSafeEquals(command.isUpsert(), Boolean.TRUE)
|
||||
result = command.isUpsert()
|
||||
? cmd.hset(command.getKey(), entry.getKey(), entry.getValue())
|
||||
: cmd.hsetnx(command.getKey(), entry.getKey(), entry.getValue());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user