Fix NPE on deserialize of Tuple values in tx/pipeline

DATAREDIS-229
This commit is contained in:
Jennifer Hickey
2013-07-24 15:08:12 -07:00
parent 76fad5f2bc
commit 48e9d34a2f

View File

@@ -150,6 +150,9 @@ abstract class AbstractOperations<K, V> {
@SuppressWarnings("unchecked")
Set<TypedTuple<V>> deserializeTupleValues(Set<Tuple> rawValues) {
if(rawValues == null) {
return null;
}
Set<TypedTuple<V>> set = new LinkedHashSet<TypedTuple<V>>(rawValues.size());
for (Tuple rawValue : rawValues) {
set.add(new DefaultTypedTuple(valueSerializer().deserialize(rawValue.getValue()), rawValue.getScore()));