-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
Fix Understood
Dynamic proxy is serializable and supported by the default serialization. On the other hand, hidden classes cannot use default serialization since it does not have a binary name. Instead it has to use a custom serialization mechanism. The serialization story will need to be sorted out.
Proxy is specified to be created with same protection domain as the system classes loaded by the bootstrap class loader such that this permission check will pass through this frame. Hidden class is defined with the same protection domain as the lookup class. This is a spec change and also needs to look into the permissions required.
In addition, Lookup::defineHiddenClass requires a Lookup object of the same package. Dynamic proxy may inject a proxy class in an empty package. This may need a way to obtain a Lookup for a non-existing package for an unnamed module but a Lookup for an existing package for a named module. This can be workaround to inject a shim class in an empty package that use its Lookup to inject hidden proxy classes.
Proxy is specified to be created with same protection domain as the system classes loaded by the bootstrap class loader such that this permission check will pass through this frame. Hidden class is defined with the same protection domain as the lookup class. This is a spec change and also needs to look into the permissions required.
In addition, Lookup::defineHiddenClass requires a Lookup object of the same package. Dynamic proxy may inject a proxy class in an empty package. This may need a way to obtain a Lookup for a non-existing package for an unnamed module but a Lookup for an existing package for a named module. This can be workaround to inject a shim class in an empty package that use its Lookup to inject hidden proxy classes.
- blocks
-
JDK-8341999 Allow unloading of dynamic Proxy implementation classes
- Open
- csr for
-
JDK-8332770 Convert dynamic proxy to hidden classes
- Draft
- is blocked by
-
JDK-8315810 Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles
- Resolved
- relates to
-
JDK-8229959 Convert proxy class to use constant dynamic
- Resolved
- links to
-
Review openjdk/jdk/8278
-
Review(master) openjdk/jdk/19356
(1 links to)