From: Alexandre Petit-Bianco Date: Thu, 17 Aug 2000 21:56:29 +0000 (+0000) Subject: natClass.cc (finit_name): Initialized with `finit$'. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fcbfa82cfad5432bf6e36cc1a4678c80c7dcc6d;p=platform%2Fupstream%2Fgcc.git natClass.cc (finit_name): Initialized with `finit$'. 2000-08-15 Alexandre Petit-Bianco * java/lang/natClass.cc (finit_name): Initialized with `finit$'. (finit_leg_name): New global. (java::lang::Class::getDeclaredMethods): Test for `finit$' or `$finit$'. This is a backward compatibility hack. (java::lang::Class::_getMethods): Likewise. (http://sources.redhat.com/ml/java-discuss/2000-08/msg00031.html See also the matching compiler patch: http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00664.html) From-SVN: r35769 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 480038b..5dbcddd 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -143,6 +143,14 @@ * Makefile.am: Added new files. * Makefile.in: Rebuilt. +2000-08-15 Alexandre Petit-Bianco + + * java/lang/natClass.cc (finit_name): Initialized with `finit$'. + (finit_leg_name): New global. + (java::lang::Class::getDeclaredMethods): Test for `finit$' or + `$finit$'. This is a backward compatibility hack. + (java::lang::Class::_getMethods): Likewise. + 2000-08-15 Andrew Haley * include/jvm.h (_Jv_HashCode): New hash code. diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 33ab1a3..1b40373 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -70,7 +70,10 @@ extern java::lang::Class ConstructorClass; static _Jv_Utf8Const *void_signature = _Jv_makeUtf8Const ("()V", 3); static _Jv_Utf8Const *clinit_name = _Jv_makeUtf8Const ("", 8); static _Jv_Utf8Const *init_name = _Jv_makeUtf8Const ("", 6); -static _Jv_Utf8Const *finit_name = _Jv_makeUtf8Const ("$finit$", 7); +static _Jv_Utf8Const *finit_name = _Jv_makeUtf8Const ("finit$", 6); +// The legacy `$finit$' method name, which still needs to be +// recognized as equivalent to the now prefered `finit$' name. +static _Jv_Utf8Const *finit_leg_name = _Jv_makeUtf8Const ("$finit$", 7); @@ -331,7 +334,9 @@ java::lang::Class::getDeclaredMethods (void) if (method->name == NULL || _Jv_equalUtf8Consts (method->name, clinit_name) || _Jv_equalUtf8Consts (method->name, init_name) - || _Jv_equalUtf8Consts (method->name, finit_name)) + || _Jv_equalUtf8Consts (method->name, finit_name) + // Backward compatibility hack: match the legacy `$finit$' name + || _Jv_equalUtf8Consts (method->name, finit_leg_name)) continue; numMethods++; } @@ -345,7 +350,9 @@ java::lang::Class::getDeclaredMethods (void) if (method->name == NULL || _Jv_equalUtf8Consts (method->name, clinit_name) || _Jv_equalUtf8Consts (method->name, init_name) - || _Jv_equalUtf8Consts (method->name, finit_name)) + || _Jv_equalUtf8Consts (method->name, finit_name) + // Backward compatibility hack: match the legacy `$finit$' name + || _Jv_equalUtf8Consts (method->name, finit_leg_name)) continue; java::lang::reflect::Method* rmethod = new java::lang::reflect::Method (); @@ -508,7 +515,9 @@ java::lang::Class::_getMethods (JArray *result, if (method->name == NULL || _Jv_equalUtf8Consts (method->name, clinit_name) || _Jv_equalUtf8Consts (method->name, init_name) - || _Jv_equalUtf8Consts (method->name, finit_name)) + || _Jv_equalUtf8Consts (method->name, finit_name) + // Backward compatibility hack: match the legacy `$finit$' name + || _Jv_equalUtf8Consts (method->name, finit_leg_name)) continue; // Only want public methods. if (! java::lang::reflect::Modifier::isPublic (method->accflags))