int32_t isEntryValid(JNIEnv *pEnv, StoreEntry *pEntry, StoreType pType) { if (pEntry == NULL) throwNotExistingKeyException(pEnv); else if (pEntry->mType != pType) throwInvalidTypeException(pEnv); else return 1; return 0; }
int32_t isEntryValid(JNIEnv* pEnv, StoreEntry* pEntry, StoreType type) { if (NULL == pEntry) { throwNotExistingKeyException(pEnv); } else if (pEntry->mType != type) { throwInvalidTypeException(pEnv); } else { return 1; } // We arrive here if an exception is raised (raising an // exception does not stop the flow of code like in Java). return 0; }