Avoid explicit class name in throw_exception. (#291)

This commit is contained in:
Liang-Chi Hsieh 2021-10-20 00:06:01 -07:00 committed by GitHub
parent 2702f510e8
commit f3d7c11a02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
inline void throw_exception(JNIEnv *env, jobject self, int errorCode)
{
jclass c = env->FindClass("org/xerial/snappy/SnappyNative");
jclass c = env->GetObjectClass(self);
if(c==0)
return;
jmethodID mth_throwex = env->GetMethodID(c, "throw_error", "(I)V");