--- old/src/hotspot/share/interpreter/linkResolver.cpp 2019-04-24 13:36:04.000000000 -0700 +++ new/src/hotspot/share/interpreter/linkResolver.cpp 2019-04-24 13:36:04.000000000 -0700 @@ -1017,10 +1017,10 @@ assert(!m.is_null(), "information about the current method must be available for 'put' bytecodes"); bool is_initialized_static_final_update = (byte == Bytecodes::_putstatic && fd.is_static() && - !m()->is_static_initializer()); + !m()->is_class_initializer()); bool is_initialized_instance_final_update = ((byte == Bytecodes::_putfield || byte == Bytecodes::_nofast_putfield) && !fd.is_static() && - !m->is_object_initializer()); + !m->is_object_constructor()); if (is_initialized_static_final_update || is_initialized_instance_final_update) { ss.print("Update to %s final field %s.%s attempted from a different method (%s) than the initializer method %s ", @@ -1138,6 +1138,8 @@ } // check if method name is , that it is found in same klass as static type + // Since this method is never inherited from a super, any appearance here under + // the wrong class would be an error. if (resolved_method->name() == vmSymbols::object_initializer_name() && resolved_method->method_holder() != resolved_klass) { ResourceMark rm(THREAD); @@ -1211,7 +1213,7 @@ methodHandle sel_method(THREAD, resolved_method()); if (link_info.check_access() && - // check if the method is not + // check if the method is not , which is never inherited resolved_method->name() != vmSymbols::object_initializer_name()) { Klass* current_klass = link_info.current_klass();