equal
deleted
inserted
replaced
4357 #ifdef ASSERT |
4357 #ifdef ASSERT |
4358 bool f = false; |
4358 bool f = false; |
4359 Method* m = k->lookup_method(vmSymbols::finalize_method_name(), |
4359 Method* m = k->lookup_method(vmSymbols::finalize_method_name(), |
4360 vmSymbols::void_method_signature()); |
4360 vmSymbols::void_method_signature()); |
4361 if (m != NULL && !m->is_empty_method()) { |
4361 if (m != NULL && !m->is_empty_method()) { |
4362 f = true; |
4362 f = true; |
4363 } |
4363 } |
4364 assert(f == k->has_finalizer(), "inconsistent has_finalizer"); |
4364 |
|
4365 // Spec doesn't prevent agent from redefinition of empty finalizer. |
|
4366 // Despite the fact that it's generally bad idea and redefined finalizer |
|
4367 // will not work as expected we shouldn't abort vm in this case |
|
4368 if (!k->has_redefined_this_or_super()) { |
|
4369 assert(f == k->has_finalizer(), "inconsistent has_finalizer"); |
|
4370 } |
4365 #endif |
4371 #endif |
4366 |
4372 |
4367 // Check if this klass supports the java.lang.Cloneable interface |
4373 // Check if this klass supports the java.lang.Cloneable interface |
4368 if (SystemDictionary::Cloneable_klass_loaded()) { |
4374 if (SystemDictionary::Cloneable_klass_loaded()) { |
4369 if (k->is_subtype_of(SystemDictionary::Cloneable_klass())) { |
4375 if (k->is_subtype_of(SystemDictionary::Cloneable_klass())) { |