From 4c09928c8ae4ac6fd77d0538306b58bede59f9ee Mon Sep 17 00:00:00 2001 From: hseigel Date: Thu, 21 Nov 2013 14:41:13 -0500 Subject: [PATCH] 8028520: JVM should not throw VerifyError when a private method overrides a final method Summary: Exclude private methods when checking for final method override. Reviewed-by: kamg, coleenp, dholmes, mseledtsov --- src/share/vm/classfile/classFileParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp index 8990cc395..db41756d1 100644 --- a/src/share/vm/classfile/classFileParser.cpp +++ b/src/share/vm/classfile/classFileParser.cpp @@ -4483,8 +4483,8 @@ void ClassFileParser::check_final_method_override(instanceKlassHandle this_klass for (int index = 0; index < num_methods; index++) { Method* m = methods->at(index); - // skip static and methods - if ((!m->is_static()) && + // skip private, static, and methods + if ((!m->is_private() && !m->is_static()) && (m->name() != vmSymbols::object_initializer_name())) { Symbol* name = m->name(); -- GitLab