mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
6904403: assert(f == k->has_finalizer(),"inconsistent has_finalizer") with debug VM
Don't assert if one of classes in hierarhy was redefined Reviewed-by: coleenp, sspitsyn
This commit is contained in:
parent
1a3734cdfa
commit
c291efb1df
9 changed files with 273 additions and 4 deletions
|
@ -4359,9 +4359,15 @@ void ClassFileParser::set_precomputed_flags(instanceKlassHandle k) {
|
|||
Method* m = k->lookup_method(vmSymbols::finalize_method_name(),
|
||||
vmSymbols::void_method_signature());
|
||||
if (m != NULL && !m->is_empty_method()) {
|
||||
f = true;
|
||||
f = true;
|
||||
}
|
||||
|
||||
// Spec doesn't prevent agent from redefinition of empty finalizer.
|
||||
// Despite the fact that it's generally bad idea and redefined finalizer
|
||||
// will not work as expected we shouldn't abort vm in this case
|
||||
if (!k->has_redefined_this_or_super()) {
|
||||
assert(f == k->has_finalizer(), "inconsistent has_finalizer");
|
||||
}
|
||||
assert(f == k->has_finalizer(), "inconsistent has_finalizer");
|
||||
#endif
|
||||
|
||||
// Check if this klass supports the java.lang.Cloneable interface
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue