/* get the C string from the java string */
if (jname == NULL) {
- jxbt_throw_null(env,bprintf("No host can have a null name"));
- return NULL;
+ jxbt_throw_null(env,bprintf("No host can have a null name"));
+ return NULL;
}
const char *name = env->GetStringUTFChars(jname, 0);
storage = MSG_storage_get_by_name(name);
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject jname, jobject jvalue) {
- msg_storage_t storage = jstorage_get_native(env, jstorage);
+ msg_storage_t storage = jstorage_get_native(env, jstorage);
if (!storage) {
jxbt_throw_notbound(env, "storage", jstorage);
MSG_storage_set_property_value(storage, name, value, xbt_free_f);
- env->ReleaseStringUTFChars((jstring) jvalue, value);
+ env->ReleaseStringUTFChars((jstring) jvalue, value_java);
env->ReleaseStringUTFChars((jstring) jname, name);
}