Caching methodId and fieldId is fine: v2

main
Ankit Gupta 11 years ago
parent b6caaea9d3
commit 0a4d930264
  1. 3
      java/rocksjni/portal.h

@ -211,8 +211,7 @@ class WriteBatchJni {
class HistogramDataJni { class HistogramDataJni {
public: public:
static jmethodID getConstructorMethodId(JNIEnv* env, jclass jclazz) { static jmethodID getConstructorMethodId(JNIEnv* env, jclass jclazz) {
jmethodID mid = env->GetMethodID( static jmethodID mid = env->GetMethodID(jclazz, "<init>", "(DDDDD)V");
jclazz, "<init>", "(DDDDD)V");
assert(mid != nullptr); assert(mid != nullptr);
return mid; return mid;
} }

Loading…
Cancel
Save