Back to index

lightning-sunbird  0.9+nobinonly
Functions
GetStaticMethodID_17.cpp File Reference
#include "JNIEnvTests.h"
#include "CallingStaticMethods.h"

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_GetStaticMethodID_17)

Function Documentation

JNI_OJIAPITest ( JNIEnv_GetStaticMethodID_17  )

Definition at line 40 of file GetStaticMethodID_17.cpp.

{
  GET_JNI_FOR_TEST
  jclass clazz_exp = env->FindClass("Ljava/security/PrivilegedActionException;");
  IMPLEMENT_GetStaticMethodID_METHOD("Test1", "Print_string_protected_static", "(Ljava/lang/String;)V");
  if(clazz == NULL){
      printf("Class is NULL!!!");
  }
  env->CallStaticVoidMethod(clazz, MethodID, NULL);

  jthrowable excep  = env->ExceptionOccurred();
  if(MethodID!=NULL){
     if((excep != NULL) && (env->IsInstanceOf(excep, clazz_exp))){
       return TestResult::PASS("GetStaticMethodID for protected static method from non-abstract class, not inherited return correct value");
     }else{
       if(SecENV){
         return TestResult::FAIL("GetStaticMethodID for protected static method from non-abstract class, not inherited return incorrect value");
       }else{
         return TestResult::PASS("GetStaticMethodID for protected static method from non-abstract class, not inherited return correct value");
       }
     }
  }else{
    return TestResult::FAIL("GetStaticMethodID for protected static method from non-abstract class, not inherited return incorrect value");
  }
}

Here is the call graph for this function: