Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename simgrid::exception into simgrid::Exception
[simgrid.git] / src / bindings / java / jmsg_vm.cpp
index 9055739..9b04afb 100644 (file)
@@ -8,14 +8,12 @@
 #include "jmsg_vm.h"
 #include "jmsg_host.h"
 #include "jxbt_utilities.hpp"
+#include "simgrid/Exception.hpp"
 #include "simgrid/plugins/live_migration.h"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
-#include "xbt/ex.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
 
-extern "C" {
-
 extern int JAVA_HOST_LEVEL;
 static jfieldID jvm_field_bind;
 
@@ -92,7 +90,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_VM_all(JNIEnv* env, jclass c
   msg_host_t h;
   xbt_dynar_foreach (hosts, it, h) {
     simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(h);
-    if (vm != nullptr && vm->getState() != SURF_VM_STATE_DESTROYED) {
+    if (vm != nullptr && vm->get_state() != simgrid::s4u::VirtualMachine::state::DESTROYED) {
       jobject jvm = static_cast<jobject>(vm->extension(JAVA_HOST_LEVEL));
       vms.push_back(jvm);
     }
@@ -194,4 +192,3 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclas
 
   return static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
 }
-}