/* Context switching within the JVM. */
-/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2022. 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. */
#include "JavaContext.hpp"
#include "jxbt_utilities.hpp"
#include "simgrid/Exception.hpp"
-#include "src/simix/smx_private.hpp"
#include <functional>
#include <utility>
//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;
}