JNI中如何判断对象是否非空?
JNI code:
JNIEXPORT static void JNICALL test(JNIEnv* env,
jobject obj,jbyteArray data){
}
Java code:
test(null);
The problem is:
I can't judge if the passed data is null,because:
env->GetByteArrayElements(data, NULL);//返回0x4373d3b0
env->GetArrayLength(data) //返回1131664320
data is not NULL