8245061: Lookup::defineHiddenClass should throw ClassFormatError if this_class is not Class_info structure

8245432: Lookup::defineHiddenClass should throw UnsupportedClassVersionError if bytes are of an unsupported major or minor version
8245596: Clarify Lookup::defineHiddenClass spec @throws IAE if the bytes has ACC_MODULE flag set

Reviewed-by: alanb, dholmes
This commit is contained in:
Mandy Chung 2020-06-01 13:19:06 -07:00
parent 1f698a35f2
commit 5e5880d4f1
10 changed files with 546 additions and 55 deletions

View file

@ -314,7 +314,7 @@ class InvokerBytecodeGenerator {
* Extract the MemberName of a newly-defined method.
*/
private MemberName loadMethod(byte[] classFile) {
Class<?> invokerClass = LOOKUP.makeHiddenClassDefiner(classFile)
Class<?> invokerClass = LOOKUP.makeHiddenClassDefiner(className(), classFile)
.defineClass(true, classDataValues());
return resolveInvokerMember(invokerClass, invokerName, invokerType);
}