DATAREDIS-824 - Fix potential NPE in DefaultReactiveHashOperations when deserializing values.

Avoid ByteBuffer creation for null values indicating absent keys in hash.

Original Pull Request: #340
This commit is contained in:
Yin Jifeng
2018-05-04 13:41:04 +08:00
committed by Christoph Strobl
parent 42aac673f6
commit 2c1ee77b87
2 changed files with 7 additions and 1 deletions

View File

@@ -178,6 +178,12 @@ public class DefaultReactiveHashOperationsIntegrationTests<K, HK, HV> {
HK hashkey2 = hashKeyFactory.instance();
HV hashvalue2 = hashValueFactory.instance();
StepVerifier.create(hashOperations.multiGet(key, Arrays.asList(hashkey1, hashkey2))) //
.consumeNextWith(actual -> {
assertThat(actual).hasSize(2).containsSequence(null, null);
}) //
.verifyComplete();
putAll(key, hashkey1, hashvalue1, hashkey2, hashvalue2);
StepVerifier.create(hashOperations.multiGet(key, Arrays.asList(hashkey1, hashkey2))) //