xetorthio/jedis — Issue #220: Pipeline.sort with dstkey uses wrong Response type
Author: lassi
Created: 2011-10-26 17:46:32+00:00
State: open

Jedis 2.0.0

The two sort commands using a destination key to store the sort result expect the wrong response type in Pipeline (and probably in Transaction as well, but I didn't test this). In the code, Response> is expected (leading to a class cast exceptionw hen reading the pipeline response later). It actually should be a Response because Redis returns the sorted collection size instead of the elements when using SORT with a destination key.

Affected methods (again, check Transaction as well):
redis.clients.jedis.Pipeline.sort(String key, SortingParams sortingParameters, String dstkey)
redis.clients.jedis.Pipeline.sort(byte[] key, SortingParams sortingParameters, byte[] dstkey)

Fix:
- change return type to Response
- use BuilderFactory.LONG for the response