Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge remote-tracking branch 'upstream/master' into issue95
[simgrid.git] / src / bindings / java / JavaContext.cpp
index 39a3070..48e1da9 100644 (file)
@@ -8,7 +8,6 @@
 #include "JavaContext.hpp"
 #include "jxbt_utilities.hpp"
 #include "simgrid/Exception.hpp"
-#include "src/simix/smx_private.hpp"
 
 #include <functional>
 #include <utility>
@@ -56,8 +55,8 @@ void JavaContext::start_hook()
 
   //Attach the thread to the JVM
   JNIEnv *env;
-  XBT_ATTRIB_UNUSED jint error = __java_vm->AttachCurrentThread((void**)&env, nullptr);
-  xbt_assert((error == JNI_OK), "The thread could not be attached to the JVM");
+  xbt_assert(__java_vm->AttachCurrentThread((void**)&env, nullptr) == JNI_OK,
+             "The thread could not be attached to the JVM");
   this->jenv_ = env;
 }