--- old/src/share/vm/classfile/classFileParser.cpp 2014-04-16 16:35:42.859112027 +0400 +++ new/src/share/vm/classfile/classFileParser.cpp 2014-04-16 16:35:42.692109231 +0400 @@ -4309,7 +4309,12 @@ Method* m = k->lookup_method(vmSymbols::finalize_method_name(), vmSymbols::void_method_signature()); if (m != NULL && !m->is_empty_method()) { - f = true; + // Spec doesn't prevent agent from redefinition of empty finalyzer. + // despite the fact that it's generally bad idea and redefined finalyzer + // will not work as expected we shouldn't abort vm in this case + if (!k->has_been_redefined()) { + f = true; + } } assert(f == k->has_finalizer(), "inconsistent has_finalizer"); #endif