diff options
author | Anthony Green <green@redhat.com> | 2001-11-17 21:32:22 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2001-11-17 21:32:22 +0000 |
commit | aee42017074928c401cc7faf2dffc4c00c677eb1 (patch) | |
tree | 50f5d71f5ab9a9ed10efa48b3c55cd6969433dfb /libjava | |
parent | 089a05b8d7a14016a8bb36c94170a1c0e72872da (diff) | |
download | gcc-aee42017074928c401cc7faf2dffc4c00c677eb1.zip gcc-aee42017074928c401cc7faf2dffc4c00c677eb1.tar.gz gcc-aee42017074928c401cc7faf2dffc4c00c677eb1.tar.bz2 |
Obvious jni weak reference fix
From-SVN: r47128
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/jni.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 6c9cf85..173cef9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2001-11-17 Anthony Green <green@redhat.com> + + * jni.cc (unwrap): Fix test for wrapped objects. + 2001-11-16 Tom Tromey <tromey@redhat.com> * verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle diff --git a/libjava/jni.cc b/libjava/jni.cc index 1aa77bc..dbe1d1f 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -212,7 +212,7 @@ unwrap (T *obj) using namespace gnu::gcj::runtime; // We can compare the class directly because JNIWeakRef is `final'. // Doing it this way is much faster. - if (obj == NULL || obj->getClass () == &JNIWeakRef::class$) + if (obj == NULL || obj->getClass () != &JNIWeakRef::class$) return obj; JNIWeakRef *wr = reinterpret_cast<JNIWeakRef *> (obj); return reinterpret_cast<T *> (wr->get ()); |