8033150: invokestatic: IncompatibleClassChangeError trying to invoke static method from a parent in presence of conflicting defaults

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
This commit is contained in:
Lois Foltan 2014-04-14 14:27:45 -04:00
parent 5ca274e0ce
commit 8c36d0cd2b
12 changed files with 76 additions and 64 deletions

View file

@ -1215,7 +1215,8 @@ JVM_ENTRY(jobject, JVM_DoPrivileged(JNIEnv *env, jclass cls, jobject action, job
// get run() method
Method* m_oop = object->klass()->uncached_lookup_method(
vmSymbols::run_method_name(),
vmSymbols::void_object_signature());
vmSymbols::void_object_signature(),
Klass::normal);
methodHandle m (THREAD, m_oop);
if (m.is_null() || !m->is_method() || !m()->is_public() || m()->is_static()) {
THROW_MSG_0(vmSymbols::java_lang_InternalError(), "No run method");