8188145: MethodHandle resolution should follow JVMS sequence of lookup by name & type before type descriptor resolution

Reviewed-by: kvn, psandoz
This commit is contained in:
Vladimir Ivanov 2018-01-12 01:52:06 +03:00
parent e2f5722888
commit 1b558514ff
7 changed files with 216 additions and 24 deletions

View file

@ -900,9 +900,9 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError;
buf.append(getName(clazz));
buf.append('.');
}
String name = getName();
String name = this.name; // avoid expanding from VM
buf.append(name == null ? "*" : name);
Object type = getType();
Object type = this.type; // avoid expanding from VM
if (!isInvocable()) {
buf.append('/');
buf.append(type == null ? "*" : getName(type));