src/share/vm/classfile/classFileParser.cpp

changeset 8049
c2c7fed86a5e
parent 7890
bf41eee321e5
child 8316
626f594dffa6
child 8368
32b682649973
equal deleted inserted replaced
8048:025f9a5e6d9c 8049:c2c7fed86a5e
4419 #ifdef ASSERT 4419 #ifdef ASSERT
4420 bool f = false; 4420 bool f = false;
4421 Method* m = k->lookup_method(vmSymbols::finalize_method_name(), 4421 Method* m = k->lookup_method(vmSymbols::finalize_method_name(),
4422 vmSymbols::void_method_signature()); 4422 vmSymbols::void_method_signature());
4423 if (m != NULL && !m->is_empty_method()) { 4423 if (m != NULL && !m->is_empty_method()) {
4424 f = true; 4424 f = true;
4425 } 4425 }
4426 assert(f == k->has_finalizer(), "inconsistent has_finalizer"); 4426
4427 // Spec doesn't prevent agent from redefinition of empty finalizer.
4428 // Despite the fact that it's generally bad idea and redefined finalizer
4429 // will not work as expected we shouldn't abort vm in this case
4430 if (!k->has_redefined_this_or_super()) {
4431 assert(f == k->has_finalizer(), "inconsistent has_finalizer");
4432 }
4427 #endif 4433 #endif
4428 4434
4429 // Check if this klass supports the java.lang.Cloneable interface 4435 // Check if this klass supports the java.lang.Cloneable interface
4430 if (SystemDictionary::Cloneable_klass_loaded()) { 4436 if (SystemDictionary::Cloneable_klass_loaded()) {
4431 if (k->is_subtype_of(SystemDictionary::Cloneable_klass())) { 4437 if (k->is_subtype_of(SystemDictionary::Cloneable_klass())) {

mercurial