From 0a4d930264d0ea9252438480c629d94731312339 Mon Sep 17 00:00:00 2001 From: Ankit Gupta Date: Wed, 9 Jul 2014 09:09:08 -0700 Subject: [PATCH] Caching methodId and fieldId is fine: v2 --- java/rocksjni/portal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/rocksjni/portal.h b/java/rocksjni/portal.h index b46ac6554..20b446863 100644 --- a/java/rocksjni/portal.h +++ b/java/rocksjni/portal.h @@ -211,8 +211,7 @@ class WriteBatchJni { class HistogramDataJni { public: static jmethodID getConstructorMethodId(JNIEnv* env, jclass jclazz) { - jmethodID mid = env->GetMethodID( - jclazz, "", "(DDDDD)V"); + static jmethodID mid = env->GetMethodID(jclazz, "", "(DDDDD)V"); assert(mid != nullptr); return mid; }