diff src/share/vm/classfile/classFileParser.cpp @ 17640:4638c4d7ff10 hs25.20-b02

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 19146c82b6fc
children 9acf9c25774d
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp	Fri Jan 24 00:20:37 2014 -0800
+++ 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
@@ -4500,8 +4500,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(),