Mercurial > hg > truffle
diff src/share/vm/classfile/verifier.cpp @ 17889:386dd1c71858
8033150: invokestatic: IncompatibleClassChangeError trying to invoke static method from a parent in presence of conflicting defaults.
Summary: A static method should be preferred during method resolution over an overpass, search the current class as well as its superclasses.
Reviewed-by: acorn, coleenp, kamg
author | lfoltan |
---|---|
date | Mon, 14 Apr 2014 14:27:45 -0400 |
parents | 22eaa15b7960 |
children | 78bbf4d43a14 364b73402247 |
line wrap: on
line diff
--- a/src/share/vm/classfile/verifier.cpp Tue Apr 15 14:34:48 2014 -0700 +++ b/src/share/vm/classfile/verifier.cpp Mon Apr 14 14:27:45 2014 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -1943,7 +1943,7 @@ InstanceKlass* target_instance = InstanceKlass::cast(target_class); fieldDescriptor fd; if (is_method) { - Method* m = target_instance->uncached_lookup_method(field_name, field_sig); + Method* m = target_instance->uncached_lookup_method(field_name, field_sig, Klass::normal); if (m != NULL && m->is_protected()) { if (!this_class->is_same_class_package(m->method_holder())) { return true; @@ -2280,7 +2280,8 @@ ref_class_type.name(), CHECK_VERIFY(this)); Method* m = InstanceKlass::cast(ref_klass)->uncached_lookup_method( vmSymbols::object_initializer_name(), - cp->signature_ref_at(bcs->get_index_u2())); + cp->signature_ref_at(bcs->get_index_u2()), + Klass::normal); instanceKlassHandle mh(THREAD, m->method_holder()); if (m->is_protected() && !mh->is_same_class_package(_klass())) { bool assignable = current_type().is_assignable_from(