mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8345502: Remove doIntersectionPrivilege methods
Reviewed-by: weijun
This commit is contained in:
parent
faa109e8d4
commit
de3a218a28
4 changed files with 1 additions and 93 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue