Mercurial > hg > graal-compiler
diff src/share/vm/classfile/classFileParser.cpp @ 14292:2e7b5143763f
8028553: The JVM should not throw VerifyError when 'overriding' a static final method in a superclass.
Summary: Check if method is static before throwing exception.
Reviewed-by: kamg, coleenp, lfoltan, fparain
author | hseigel |
---|---|
date | Fri, 24 Jan 2014 08:13:42 -0500 |
parents | 715bc50198c1 |
children | 4802ce6fbff6 |
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp Thu Jan 23 16:02:14 2014 -0500 +++ b/src/share/vm/classfile/classFileParser.cpp Fri Jan 24 08:13:42 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -4504,8 +4504,8 @@ break; // didn't find any match; get out } - if (super_m->is_final() && - // matching method in super is final + if (super_m->is_final() && !super_m->is_static() && + // matching method in super is final, and not static (Reflection::verify_field_access(this_klass(), super_m->method_holder(), super_m->method_holder(),