diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-30 02:41:54 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-30 02:41:54 +0000 |
commit | ad7725de46cd32955589808a71f19b0c8dbc295d (patch) | |
tree | b2bfcad46ab64f8dbcbfaf4ac8368d05a5df53b6 | |
parent | 999e2fe6584030578eb18e2d995322a08e805f08 (diff) | |
download | gcc-ad7725de46cd32955589808a71f19b0c8dbc295d.tar.gz |
* java/lang/natClass.cc (_Jv_IsAssignableFrom): Handle the case of
an uninitialized target class.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45893 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/natClass.cc | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 9c32b0cb910..a76e94186b9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2001-09-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz> + + * java/lang/natClass.cc (_Jv_IsAssignableFrom): Handle the case of + an uninitialized target class. + 2001-09-28 Per Bothner <per@bothner.com> * gnu/gcj/runtime/SharedLibLoader.java: New class. diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index d6fb3ab7d85..7b6b8b554a8 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -956,8 +956,9 @@ _Jv_IsAssignableFrom (jclass target, jclass source) return false; return true; } - else if (source->ancestors != NULL - && source->depth >= target->depth + else if (source->ancestors != NULL + && target->ancestors != NULL + && source->depth >= target->depth && source->ancestors[source->depth - target->depth] == target) return true; |