Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / bindings / java / jxbt_utilities.cpp
index 9eb4936..137d067 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);