-
Type:
CSR
-
Resolution: Unresolved
-
Priority:
P4
-
Component/s: core-libs
-
None
-
behavioral
-
low
-
-
Java API
-
Implementation
Summary
After JDK-8366424, a call to ObjectMethods.bootstrap may throw IllegalAccessException in some cases when the argument lookup does not have full privilege access.
Problem
ObjectMethods.bootstrap claims it ignores the lookup argument.
However, the reference implementation of bootstrap may need the lookup to construct hidden classes to address performance issues with the returned Method Handles or Call Sites.
Solution
If the lookup is used to construct hidden classes, bootstrap requires full privilege access for the lookup and throws an IllegalAccessException otherwise.
The lookup is not guaranteed to be used by bootstrap. In that case, no exception is thrown.
Specification
No change.
Note that bootstrap has param clause as follows:
* @param lookup Every bootstrap method is expected to have a {@code lookup}
* which usually represents a lookup context with the
* accessibility privileges of the caller. This is because
* {@code invokedynamic} call sites always provide a {@code lookup}
* to the corresponding bootstrap method, but this method just
* ignores the {@code lookup} parameter
which is violated by this behavioral change.
However, the throws clause may be more permissive:
@throws Throwable if any exception is thrown during call site construction
Currently this inconsistency is planned to be addressed in release 27.
- csr of
-
JDK-8366424 Missing type profiling in generated Record Object methods
-
- Resolved
-