-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b26
Tested method: MethodHandles.Lookup defineHiddenClass
List of assertions:
1. Creates a hidden class or interface C from bytes, returning a Lookup on the newly created class or interface.
C is derived with name CN, class loader L, and purported representation newBytes as if by the rules of JVMS 5.3.5..:
JVMS 5.3.5:
2. Otherwise, the Java Virtual Machine attempts to parse the purported representation. However, the purported representation may not in fact be a valid representation of C.
This phase of loading must detect the following errors:
Otherwise, if the purported representation does not actually represent a class named N, loading throws an instance of NoClassDefFoundError or an instance of one of its subclasses.
This occurs when the purported representation ... has an access_flags item which has the ACC_MODULE flag set.
The implementation throws IllegalArgumentException although NoClassDefFoundError is expected.
The API spec does not state behavior in the case when ACC_MODULE is set in an array of bytes presenting a class File, thus the implementation should follow JVMS 5.3.5 and throws NoClassDefFoundError
List of assertions:
1. Creates a hidden class or interface C from bytes, returning a Lookup on the newly created class or interface.
C is derived with name CN, class loader L, and purported representation newBytes as if by the rules of JVMS 5.3.5..:
JVMS 5.3.5:
2. Otherwise, the Java Virtual Machine attempts to parse the purported representation. However, the purported representation may not in fact be a valid representation of C.
This phase of loading must detect the following errors:
Otherwise, if the purported representation does not actually represent a class named N, loading throws an instance of NoClassDefFoundError or an instance of one of its subclasses.
This occurs when the purported representation ... has an access_flags item which has the ACC_MODULE flag set.
The implementation throws IllegalArgumentException although NoClassDefFoundError is expected.
The API spec does not state behavior in the case when ACC_MODULE is set in an array of bytes presenting a class File, thus the implementation should follow JVMS 5.3.5 and throws NoClassDefFoundError
- csr for
-
JDK-8246108 Lookup::defineClass spec throws `IllegalArgumentException` if ACC_MODULE flag is set in the access_flags item
-
- Closed
-