Back to index

lightning-sunbird  0.9+nobinonly
ReleaseStringUTFChars_2.cpp File Reference
#include "JNIEnvTests.h"
#include "StringOperations.h"

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_ReleaseStringUTFChars_2)

Function Documentation

JNI_OJIAPITest ( JNIEnv_ReleaseStringUTFChars_2  )

Definition at line 40 of file ReleaseStringUTFChars_2.cpp.


  IMPLEMENT_GetMethodID_METHOD("Test1", "Print_string", "(Ljava/lang/String;)V");
  jstring str = env->NewStringUTF("12345678"); 
  env->CallVoidMethod(obj, MethodID, str);
  jboolean isCopy = TRUE;
  char* str_chars = (char *) env->GetStringUTFChars(str, &isCopy);
  printf("The GetStringUTFChars returned : %s\n\n", str_chars);
  env->ReleaseStringUTFChars(NULL, NULL);

  return TestResult::PASS("ReleaseStringUTFChars(NULL, NULL) do not failed");


Here is the call graph for this function: