Assert on key size in multiget

main
Ankit Gupta 11 years ago
parent 65fba4b984
commit d5cb6e7bb5
  1. 4
      java/org/rocksdb/RocksDB.java

@ -171,6 +171,8 @@ public class RocksDB {
*/
public Map<byte[], byte[]> multiGet(List<byte[]> keys)
throws RocksDBException {
assert(keys.size() != 0);
List<byte[]> values = multiGet(
nativeHandle_, keys, keys.size());
@ -199,6 +201,8 @@ public class RocksDB {
*/
public Map<byte[], byte[]> multiGet(ReadOptions opt, List<byte[]> keys)
throws RocksDBException {
assert(keys.size() != 0);
List<byte[]> values = multiGet(
nativeHandle_, opt.nativeHandle_, keys, keys.size());

Loading…
Cancel
Save