Merge branch 'unsigned_long_cursor_remove_deprecated' of https://github.com/HeartSaVioR/jedis into HeartSaVioR-unsigned_long_cursor_remove_deprecated
Conflicts: src/main/java/redis/clients/jedis/Jedis.java src/main/java/redis/clients/jedis/JedisCluster.java src/main/java/redis/clients/jedis/ScanResult.java src/main/java/redis/clients/jedis/ShardedJedis.java
This commit is contained in:
@@ -8,16 +8,6 @@ public class ScanResult<T> {
|
||||
private byte[] cursor;
|
||||
private List<T> results;
|
||||
|
||||
@Deprecated
|
||||
/**
|
||||
* This method is deprecated due to bug (scan cursor should be unsigned long)
|
||||
* And will be removed on next major release
|
||||
* @see https://github.com/xetorthio/jedis/issues/531
|
||||
*/
|
||||
public ScanResult(int cursor, List<T> results) {
|
||||
this(Protocol.toByteArray(cursor), results);
|
||||
}
|
||||
|
||||
public ScanResult(String cursor, List<T> results) {
|
||||
this(SafeEncoder.encode(cursor), results);
|
||||
}
|
||||
@@ -27,21 +17,7 @@ public class ScanResult<T> {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
/**
|
||||
* This method is deprecated due to bug (scan cursor should be unsigned long)
|
||||
* And will be removed on next major release
|
||||
* @see https://github.com/xetorthio/jedis/issues/531
|
||||
* @return int(currently), but will be changed to String, so be careful to prepare!
|
||||
*/
|
||||
public int getCursor() {
|
||||
return Integer.parseInt(getStringCursor());
|
||||
}
|
||||
|
||||
/**
|
||||
* FIXME: This method should be changed to getCursor() on next major release
|
||||
*/
|
||||
public String getStringCursor() {
|
||||
public String getCursor() {
|
||||
return SafeEncoder.encode(cursor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user