X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ab92608267358b56adf7a803480fa2ad9608ed1b..f9436b840852218b39dce22d6057b6f223168daa:/src/bindings/java/jmsg_storage.cpp diff --git a/src/bindings/java/jmsg_storage.cpp b/src/bindings/java/jmsg_storage.cpp index 15bd3fe4ed..a9f5629ed2 100644 --- a/src/bindings/java/jmsg_storage.cpp +++ b/src/bindings/java/jmsg_storage.cpp @@ -63,7 +63,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, j const char *name = env->GetStringUTFChars(jname, 0); storage = MSG_storage_get_by_name(name); - if (!storage) { /* invalid name */ + if (not storage) { /* invalid name */ jxbt_throw_storage_not_found(env, name); env->ReleaseStringUTFChars(jname, name); return nullptr; @@ -74,7 +74,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, j /* Instantiate a new java storage */ jstorage = jstorage_new_instance(env); - if (!jstorage) { + if (not jstorage) { jxbt_throw_jni(env, "java storage instantiation failed"); return nullptr; } @@ -82,7 +82,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, j /* get a global reference to the newly created storage */ jstorage = jstorage_ref(env, jstorage); - if (!jstorage) { + if (not jstorage) { jxbt_throw_jni(env, "new global ref allocation failed"); return nullptr; } @@ -105,7 +105,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, j JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getSize(JNIEnv * env,jobject jstorage) { msg_storage_t storage = jstorage_get_native(env, jstorage); - if (!storage) { + if (not storage) { jxbt_throw_notbound(env, "storage", jstorage); return -1; } @@ -116,7 +116,7 @@ JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getSize(JNIEnv * env,jobjec JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getFreeSize(JNIEnv * env,jobject jstorage) { msg_storage_t storage = jstorage_get_native(env, jstorage); - if (!storage) { + if (not storage) { jxbt_throw_notbound(env, "storage", jstorage); return -1; } @@ -127,7 +127,7 @@ JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getFreeSize(JNIEnv * env,jo JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getUsedSize(JNIEnv * env,jobject jstorage) { msg_storage_t storage = jstorage_get_native(env, jstorage); - if (!storage) { + if (not storage) { jxbt_throw_notbound(env, "storage", jstorage); return -1; } @@ -138,14 +138,14 @@ JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getUsedSize(JNIEnv * env,jo JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getProperty(JNIEnv *env, jobject jstorage, jobject jname) { msg_storage_t storage = jstorage_get_native(env, jstorage); - if (!storage) { + if (not storage) { jxbt_throw_notbound(env, "storage", jstorage); return nullptr; } const char *name = env->GetStringUTFChars((jstring) jname, 0); const char *property = MSG_storage_get_property_value(storage, name); - if (!property) { + if (not property) { return nullptr; } jobject jproperty = env->NewStringUTF(property); @@ -159,7 +159,7 @@ 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); - if (!storage) { + if (not storage) { jxbt_throw_notbound(env, "storage", jstorage); return; } @@ -177,12 +177,12 @@ Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getHost(JNIEnv * env,jobject jstorage) { msg_storage_t storage = jstorage_get_native(env, jstorage); - if (!storage) { + if (not storage) { jxbt_throw_notbound(env, "storage", jstorage); return nullptr; } const char *host_name = MSG_storage_get_host(storage); - if (!host_name) { + if (not host_name) { return nullptr; } jobject jhost_name = env->NewStringUTF(host_name); @@ -203,13 +203,13 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Storage_all(JNIEnv * env, jc jclass cls = jxbt_get_class(env, "org/simgrid/msg/Storage"); - if (!cls) { + if (not cls) { return nullptr; } jtable = env->NewObjectArray((jsize) count, cls, nullptr); - if (!jtable) { + if (not jtable) { jxbt_throw_jni(env, "Storages table allocation failed"); return nullptr; }