addAndGet serialization fixed. #120

pull/139/head
Nikita 10 years ago
parent 742483c206
commit 35b64bebaa

@ -379,12 +379,12 @@ public class RedisAsyncConnection<K, V> extends ChannelInboundHandlerAdapter {
}
public Future<Long> hincrby(K key, K field, long amount) {
CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key).addKey(field).add(amount);
CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key).addMapKey(field).add(amount);
return dispatch(HINCRBY, new IntegerOutput<K, V>(codec), args);
}
public Future<String> hincrbyfloat(K key, K field, String amount) {
CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key).addKey(field).add(amount);
CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key).addMapKey(field).add(amount);
return dispatch(HINCRBYFLOAT, new StatusOutput<K, V>(codec), args);
}

@ -126,6 +126,8 @@ public class RedissonMapTest extends BaseTest {
Integer res = map.addAndGet(1, 12);
Assert.assertEquals(112, (int)res);
res = map.get(1);
Assert.assertEquals(112, (int)res);
}
@Test

Loading…
Cancel
Save