Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / bindings / java / jxbt_utilities.cpp
index 9eb4936..d418b3f 100644 (file)
@@ -1,6 +1,6 @@
 /* Various JNI helper functions                                             */
 
-/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -33,7 +33,7 @@ jmethodID jxbt_get_jmethod(JNIEnv * env, jclass cls, const char *name, const cha
 
   if (not id) {
     jmethodID tostr_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
-    jstring jclassname = (jstring) env->CallObjectMethod(cls, tostr_id, nullptr);
+    auto jclassname       = (jstring)env->CallObjectMethod(cls, tostr_id, nullptr);
     const char* classname = env->GetStringUTFChars(jclassname, nullptr);
 
     env->ReleaseStringUTFChars(jclassname, classname);
@@ -55,7 +55,7 @@ jmethodID jxbt_get_static_jmethod(JNIEnv * env, jclass cls, const char *name, co
 
   if (not id) {
     jmethodID tostr_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
-    jstring jclassname = (jstring) env->CallObjectMethod(cls, tostr_id, nullptr);
+    auto jclassname       = (jstring)env->CallObjectMethod(cls, tostr_id, nullptr);
     const char* classname = env->GetStringUTFChars(jclassname, nullptr);
 
     env->ReleaseStringUTFChars(jclassname, classname);
@@ -114,7 +114,7 @@ jfieldID jxbt_get_jfield(JNIEnv * env, jclass cls, const char *name, const char
 
   if (not id) {
     jmethodID getname_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
-    jstring jclassname = (jstring) env->CallObjectMethod(cls, getname_id, nullptr);
+    auto jclassname       = (jstring)env->CallObjectMethod(cls, getname_id, nullptr);
     const char* classname = env->GetStringUTFChars(jclassname, nullptr);
 
     env->ReleaseStringUTFChars(jclassname, classname);
@@ -180,11 +180,6 @@ void jxbt_throw_host_not_found(JNIEnv* env, const std::string& invalid_name)
   jxbt_throw_by_name(env, "org/simgrid/msg/HostNotFoundException", "No such host: " + invalid_name);
 }
 
-void jxbt_throw_storage_not_found(JNIEnv* env, const std::string& invalid_name)
-{
-  jxbt_throw_by_name(env, "org/simgrid/msg/StorageNotFoundException", "No such storage: " + invalid_name);
-}
-
 void jxbt_throw_process_not_found(JNIEnv* env, const std::string& invalid_name)
 {
   jxbt_throw_by_name(env, "org/simgrid/msg/ProcessNotFoundException", "No such process: " + invalid_name);