if (jreceiving == JNI_TRUE) {
//bind the task object.
msg_task_t task = MSG_comm_get_task(comm);
- xbt_assert(task != NULL, "Task is NULL");
- jobject jtask_global = (jobject) MSG_task_get_data(task);
+ xbt_assert(task != nullptr, "Task is nullptr");
+ jobject jtask_global = static_cast<jobject>(MSG_task_get_data(task));
//case where the data has already been retrieved
- if (jtask_global == NULL) {
+ if (jtask_global == nullptr) {
return;
}
env->SetObjectField(jcomm, jtask_field_Comm_task, jtask_local);
- MSG_task_set_data(task, NULL);
+ MSG_task_set_data(task, nullptr);
}
}
}
msg_error_t status;
- status = MSG_comm_wait(comm,(double)timeout);
+ status = MSG_comm_wait(comm,static_cast<double>(timeout));
env->SetBooleanField(jcomm, jcomm_field_Comm_finished, JNI_TRUE);
if (status == MSG_OK) {
jcomm_bind_task(env,jcomm);