diff --git a/java/rocksjni/sst_file_manager.cc b/java/rocksjni/sst_file_manager.cc index 4b410ba2f..440411c39 100644 --- a/java/rocksjni/sst_file_manager.cc +++ b/java/rocksjni/sst_file_manager.cc @@ -138,7 +138,7 @@ jobject Java_org_rocksdb_SstFileManager_getTrackedFiles(JNIEnv* env, const rocksdb::HashMapJni::FnMapKV fn_map_kv = - [env, &tracked_files]( + [env]( const std::pair& pair) { const jstring jtracked_file_path = env->NewStringUTF(pair.first.c_str());