-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b06
sun.security.action has a few convenient class that JDK classes use and the callsite looks like this:
AccessController.doPrivileged(new GetPropertyAction(propertyName));
This leads to many jdk modules depending on these module-private API in the base module.
With lambda, these usages can be replaced with:
AccessController.doPrivileged(
(PrivilegedAction<String>) () -> System.getProperty(propertyName));
The use of these convenient classes is not absolutely necessary and in fact the action is made more explicit in the callsite which has the benefit. I propose to eliminate the cross-module dependency to sun.security.action to reduce the number of the base module-private APIs being used by other jdk modules.
AccessController.doPrivileged(new GetPropertyAction(propertyName));
This leads to many jdk modules depending on these module-private API in the base module.
With lambda, these usages can be replaced with:
AccessController.doPrivileged(
(PrivilegedAction<String>) () -> System.getProperty(propertyName));
The use of these convenient classes is not absolutely necessary and in fact the action is made more explicit in the callsite which has the benefit. I propose to eliminate the cross-module dependency to sun.security.action to reduce the number of the base module-private APIs being used by other jdk modules.
- relates to
-
JDK-8038177 Eliminate unnecessary dependency to sun.security.action
-
- Resolved
-