X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b52ca441291c14eacf8cb9badfdfcbc95a618be6..39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f:/src/bindings/java/jmsg_storage.cpp diff --git a/src/bindings/java/jmsg_storage.cpp b/src/bindings/java/jmsg_storage.cpp index b88ed1c696..ebffb3245f 100644 --- a/src/bindings/java/jmsg_storage.cpp +++ b/src/bindings/java/jmsg_storage.cpp @@ -1,6 +1,6 @@ /* Java bindings of the Storage API. */ -/* Copyright (c) 2012-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2012-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -61,7 +61,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, j jxbt_throw_null(env, "No host can have a null name"); return nullptr; } - const char *name = env->GetStringUTFChars(jname, 0); + const char* name = env->GetStringUTFChars(jname, nullptr); storage = sg_storage_get_by_name(name); if (not storage) { /* invalid name */ @@ -143,7 +143,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getProperty(JNIEnv *env, jxbt_throw_notbound(env, "storage", jstorage); return nullptr; } - const char *name = env->GetStringUTFChars((jstring) jname, 0); + const char* name = env->GetStringUTFChars((jstring)jname, nullptr); const char* property = sg_storage_get_property_value(storage, name); if (not property) { @@ -164,8 +164,8 @@ Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject jxbt_throw_notbound(env, "storage", jstorage); return; } - const char *name = env->GetStringUTFChars((jstring) jname, 0); - const char *value_java = env->GetStringUTFChars((jstring) jvalue, 0); + const char* name = env->GetStringUTFChars((jstring)jname, nullptr); + const char* value_java = env->GetStringUTFChars((jstring)jvalue, nullptr); storage->set_property(name, std::string(value_java));