rocksdbjni: Possible NPE in RocksDB.setOptions #7869 (#7909)

Summary:
Fix for https://github.com/facebook/rocksdb/issues/7869

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7909

Reviewed By: akankshamahajan15

Differential Revision: D26181440

Pulled By: ajkr

fbshipit-source-id: f323aec9d91e177fa873599b99801b391cf094b1
This commit is contained in:
stefan-zobel 2021-02-18 15:46:58 -08:00 committed by Facebook GitHub Bot
parent 0c2d71edba
commit 251143f8fb

View File

@ -3574,9 +3574,8 @@ public class RocksDB extends RocksObject {
/* @Nullable */final ColumnFamilyHandle columnFamilyHandle,
final MutableColumnFamilyOptions mutableColumnFamilyOptions)
throws RocksDBException {
setOptions(nativeHandle_, columnFamilyHandle.nativeHandle_,
mutableColumnFamilyOptions.getKeys(),
mutableColumnFamilyOptions.getValues());
setOptions(nativeHandle_, columnFamilyHandle == null ? 0 : columnFamilyHandle.nativeHandle_,
mutableColumnFamilyOptions.getKeys(), mutableColumnFamilyOptions.getValues());
}
/**