Fix warning in JNI code