Constructor.java (toString): Avoid extra whitespace on constructor with no modifiers.
2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz> * java/lang/reflect/Constructor.java (toString): Avoid extra whitespace on constructor with no modifiers. * java/lang/reflect/natConstructor.java (newInstance): Look up caller and perform accessibility check only if constructor is non-public and accessible flag is not set. 2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz> * jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with is_virtual_call argument. * include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from natClass.cc. * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use _Jv_isVirtualMethod. * java/lang/reflect/natMethod.cc (invoke): Don't use _Jv_LookupDeclaredMethod. (_Jv_CallAnyMethodA): New is_virtual_call argument. If specified, look up method in target object's vtable. From-SVN: r72942
This commit is contained in:
parent
077a148bf5
commit
b9b5672b49
7 changed files with 90 additions and 57 deletions
|
@ -1779,16 +1779,6 @@ _Jv_linkExceptionClassTable (jclass self)
|
|||
self->catch_classes->classname = (_Jv_Utf8Const *)-1;
|
||||
}
|
||||
|
||||
|
||||
// Returns true if METH should get an entry in a VTable.
|
||||
static jboolean
|
||||
isVirtualMethod (_Jv_Method *meth)
|
||||
{
|
||||
using namespace java::lang::reflect;
|
||||
return (((meth->accflags & (Modifier::STATIC | Modifier::PRIVATE)) == 0)
|
||||
&& meth->name->data[0] != '<');
|
||||
}
|
||||
|
||||
// This is put in empty vtable slots.
|
||||
static void
|
||||
_Jv_abstractMethodError (void)
|
||||
|
@ -1842,7 +1832,7 @@ _Jv_LayoutVTableMethods (jclass klass)
|
|||
_Jv_Method *meth = &klass->methods[i];
|
||||
_Jv_Method *super_meth = NULL;
|
||||
|
||||
if (! isVirtualMethod (meth))
|
||||
if (! _Jv_isVirtualMethod (meth))
|
||||
continue;
|
||||
|
||||
if (superclass != NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue