commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: Fix GetMethodID call to use proper class references


From: Mark Wielaard
Subject: FYI: Fix GetMethodID call to use proper class references
Date: Sat, 26 Jun 2004 19:01:36 +0200

Hi,

While testing the FileDialog I encountered the following mixup of using
java.lang.String and not java/lang/String in a JNI method call.

2004-06-26  Mark Wielaard  <address@hidden>

       * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
       (ok_clicked): Use Ljava/lang/String; not Ljava.lang.String; in JNI
       GetMethodID call.
       (cancel_clicked): Likewise.

This makes the gtk+ peer FileDialog work on runtimes that are strict
about these kind of JNI details.

Committed.

Cheers,

Mark

--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c       7 Apr 
2004 20:28:54 -0000       1.10
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c       26 Jun 
2004 16:54:57 -0000
@@ -198,7 +198,7 @@
       jclass cx = (*gdk_env)->GetObjectClass (gdk_env, peer_obj);
       hideID = (*gdk_env)->GetMethodID (gdk_env, cx, "gtkHideFileDialog", 
"()V");
       gtkSetFilenameID = (*gdk_env)->GetMethodID (gdk_env, cx,
-                                   "gtkSetFilename", "(Ljava.lang.String;)V");
+                                   "gtkSetFilename", "(Ljava/lang/String;)V");
       isIDSet = 1;
     }

@@ -230,7 +230,7 @@
       jclass cx = (*gdk_env)->GetObjectClass (gdk_env, peer_obj);
       hideID = (*gdk_env)->GetMethodID (gdk_env, cx, "gtkHideFileDialog", 
"()V");
       gtkSetFilenameID = (*gdk_env)->GetMethodID (gdk_env, cx,
-                                   "gtkSetFilename", "(Ljava.lang.String;)V");
+                                   "gtkSetFilename", "(Ljava/lang/String;)V");
       isIDSet = 1;
     }


Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]