From 4c99a1f80a18f5dc76d9406b9c531f0fa472f5d7 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 21 Aug 2020 11:47:24 +0300 Subject: [PATCH] 0031727: Samples, JNI Sample - JNI DETECTED ERROR on calling OcctJniRenderer.postMessage() Use CallVoidMethod() instead of CallObjectMethod(). --- samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx b/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx index 3c12ca6b6e..c47d9934cb 100644 --- a/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx +++ b/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx @@ -66,6 +66,6 @@ void OcctJni_MsgPrinter::send (const TCollection_AsciiString& theString, } jstring aJStr = myJEnv->NewStringUTF ((theString + "\n").ToCString()); - myJEnv->CallObjectMethod (myJObj, myJMet, aJStr); + myJEnv->CallVoidMethod (myJObj, myJMet, aJStr); myJEnv->DeleteLocalRef (aJStr); }