natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can not be assigned to Object.

* java/lang/natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can
	not be assigned to Object.

From-SVN: r38505
This commit is contained in:
Bryce McKinlay 2000-12-28 04:33:53 +00:00
parent 6385a28ffb
commit 867e24ad3d

View File

@ -909,8 +909,8 @@ _Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface, int method_idx)
jboolean jboolean
_Jv_IsAssignableFrom (jclass target, jclass source) _Jv_IsAssignableFrom (jclass target, jclass source)
{ {
if (target == &ObjectClass if (source == target
|| source == target || (target == &ObjectClass && !source->isPrimitive())
|| (source->ancestors != NULL || (source->ancestors != NULL
&& source->ancestors[source->depth - target->depth] == target)) && source->ancestors[source->depth - target->depth] == target))
return true; return true;