LOGD("OcCloudProvisioning_requestCertificate");
if (!jListener)
{
- ThrowOcException(OC_STACK_INVALID_PARAM, "Listener cannot be null");
+ ThrowOcException(OC_STACK_INVALID_CALLBACK, "Listener cannot be null");
return;
}
(JNIEnv *env, jobject thiz, jstring jdeviceId, jobject jListener)
{
LOGD("OcCloudProvisioning_getAclIdByDevice");
- if (!jListener || !jdeviceId)
+ if (!jListener)
{
- ThrowOcException(OC_STACK_INVALID_PARAM, "Listener and deviceID cannot be null");
+ ThrowOcException(OC_STACK_INVALID_CALLBACK, "Listener cannot be null");
return;
}
+ if (!jdeviceId)
+ {
+ ThrowOcException(OC_STACK_INVALID_PARAM, "deviceID can not be null");
+ return;
+ }
JniOcCloudProvisioning *cloud = JniOcCloudProvisioning::getJniOcCloudProvisioningPtr(env, thiz);
if (!cloud)
{
(JNIEnv *env, jobject thiz, jstring jaclID, jobject jListener)
{
LOGD("OcCloudProvisioning_getIndividualAclInfo");
- if (!jListener || !jaclID)
+ if (!jListener)
{
- ThrowOcException(OC_STACK_INVALID_PARAM, "Listener/aclID cannot be null");
+ ThrowOcException(OC_STACK_INVALID_CALLBACK, "Listener cannot be null");
+ return;
+ }
+ if (!jaclID)
+ {
+ ThrowOcException(OC_STACK_INVALID_PARAM, "aclID cannot be null");
return;
}
LOGD("OcCloudProvisioning_getCRL");
if (!jListener)
{
- ThrowOcException(OC_STACK_INVALID_PARAM, "Listener cannot be null");
+ ThrowOcException(OC_STACK_INVALID_CALLBACK, "Listener cannot be null");
return;
}
jobjectArray jserialnumArray, jobject jListener)
{
LOGD("OcCloudProvisioning_postCRL0");
- if (!jListener || !jthisUpdate || !jnextUpdate || !jserialnumArray)
+ if (!jListener)
+ {
+ ThrowOcException(OC_STACK_INVALID_CALLBACK,"Listener can not be null");
+ return;
+ }
+ if (!jthisUpdate || !jnextUpdate || !jserialnumArray)
{
ThrowOcException(OC_STACK_INVALID_PARAM, " Invalid parameter (NULL param)");
return;