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
1 changed files with 2 additions and 2 deletions

View File

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