8345502: Remove doIntersectionPrivilege methods

Reviewed-by: weijun
This commit is contained in:
Sean Mullan 2024-12-04 19:17:51 +00:00
parent faa109e8d4
commit de3a218a28
4 changed files with 1 additions and 93 deletions

View file

@ -43,7 +43,7 @@ import sun.security.jca.GetInstance;
* supported. Installing a system-wide {@code Policy} object is no longer
* supported. The {@linkplain #setPolicy setPolicy} method has been
* changed to always throw {@code UnsupportedOperationException}. The
* {@linkplain getPolicy getPolicy} method has been changed to always
* {@linkplain #getPolicy getPolicy} method has been changed to always
* return a {@code Policy} object that grants no permissions. There is no
* replacement for the Security Manager or this class.
*/

View file

@ -25,9 +25,6 @@
package java.security;
import jdk.internal.access.JavaSecurityAccess;
import jdk.internal.access.SharedSecrets;
/**
* The {@code ProtectionDomain} class encapsulates the characteristics of a
* domain, which encloses a set of classes whose instances are granted a set
@ -51,39 +48,6 @@ import jdk.internal.access.SharedSecrets;
public class ProtectionDomain {
private static class JavaSecurityAccessImpl implements JavaSecurityAccess {
private JavaSecurityAccessImpl() {
}
@SuppressWarnings("removal")
@Override
public <T> T doIntersectionPrivilege(
PrivilegedAction<T> action,
final AccessControlContext stack,
final AccessControlContext context) {
if (action == null) {
throw new NullPointerException();
}
return AccessController.doPrivileged(action);
}
@SuppressWarnings("removal")
@Override
public <T> T doIntersectionPrivilege(
PrivilegedAction<T> action,
AccessControlContext context) {
return doIntersectionPrivilege(action,
AccessController.getContext(), context);
}
}
static {
// Set up JavaSecurityAccess in SharedSecrets
SharedSecrets.setJavaSecurityAccess(new JavaSecurityAccessImpl());
}
/* CodeSource */
private final CodeSource codesource ;