From d5cb6e7bb5f8a76e7ecaab50b022489d8d662cec Mon Sep 17 00:00:00 2001 From: Ankit Gupta Date: Tue, 29 Apr 2014 08:02:52 -0700 Subject: [PATCH] Assert on key size in multiget --- java/org/rocksdb/RocksDB.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/org/rocksdb/RocksDB.java b/java/org/rocksdb/RocksDB.java index 728798ade..9ff45707f 100644 --- a/java/org/rocksdb/RocksDB.java +++ b/java/org/rocksdb/RocksDB.java @@ -171,6 +171,8 @@ public class RocksDB { */ public Map multiGet(List keys) throws RocksDBException { + assert(keys.size() != 0); + List values = multiGet( nativeHandle_, keys, keys.size()); @@ -199,6 +201,8 @@ public class RocksDB { */ public Map multiGet(ReadOptions opt, List keys) throws RocksDBException { + assert(keys.size() != 0); + List values = multiGet( nativeHandle_, opt.nativeHandle_, keys, keys.size());