This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
jni fixlet
- From: Marco Trudel <mtrudel at gmx dot ch>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Thu, 01 Feb 2007 21:14:42 +0100
- Subject: jni fixlet
Attached a jni fixlet.
2007-02-01 Marco Trudel <mtrudel@gmx.ch>
* jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects.
Question? Comments?
Can someone please commit?
thanks
Marco
Index: jni.cc
===================================================================
--- jni.cc (revision 121467)
+++ jni.cc (working copy)
@@ -1750,6 +1750,8 @@
void JNICALL
_Jv_JNI_DeleteWeakGlobalRef (JNIEnv *, jweak obj)
{
+ if(obj == NULL) return; // Behaviour of a Sun JVM
+
using namespace gnu::gcj::runtime;
JNIWeakRef *ref = reinterpret_cast<JNIWeakRef *> (obj);
unmark_for_gc (ref, global_ref_table);