Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git://scm.gforge.inria.fr/simgrid/simgrid-java
[simgrid.git] / src / jmsg_host.c
index da4426b..9fae1d7 100644 (file)
@@ -56,8 +56,7 @@ JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Host_nativeInit(JNIEnv *env, jclass cls) {
        jclass class_Host = (*env)->FindClass(env, "org/simgrid/msg/Host");
        jhost_method_Host_constructor = (*env)->GetMethodID(env, class_Host, "<init>", "()V");
-       //FIXME: Don't use jxbt_get_sfield directly, it is slower.
-       jhost_field_Host_bind = jxbt_get_sfield(env,"org/simgrid/msg/Host", "bind", "J");
+       jhost_field_Host_bind = jxbt_get_jfield(env,class_Host, "bind", "J");
        jhost_field_Host_name = jxbt_get_jfield(env, class_Host, "name", "Ljava/lang/String;");
        if (!class_Host || !jhost_field_Host_name || !jhost_method_Host_constructor || !jhost_field_Host_bind) {
        jxbt_throw_native(env,bprintf("Can't find some fields in Java class. You should report this bug."));