mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8345065: Cleanup DomainCombiner, SubjectDomainCombiner, Subject, and PrivilegedAction specifications
Reviewed-by: weijun
This commit is contained in:
parent
4000e923e8
commit
e13206d3a1
6 changed files with 19 additions and 27 deletions
|
@ -46,8 +46,7 @@ public interface DomainCombiner {
|
||||||
* set of Permissions, for example).
|
* set of Permissions, for example).
|
||||||
*
|
*
|
||||||
* @param currentDomains the ProtectionDomains associated with the
|
* @param currentDomains the ProtectionDomains associated with the
|
||||||
* current execution thread, up to the most recent
|
* current execution thread.
|
||||||
* privileged {@code ProtectionDomain}.
|
|
||||||
* The ProtectionDomains are listed in order of execution,
|
* The ProtectionDomains are listed in order of execution,
|
||||||
* with the most recently executing {@code ProtectionDomain}
|
* with the most recently executing {@code ProtectionDomain}
|
||||||
* residing at the beginning of the array. This parameter may
|
* residing at the beginning of the array. This parameter may
|
||||||
|
@ -55,8 +54,6 @@ public interface DomainCombiner {
|
||||||
* has no associated ProtectionDomains.
|
* has no associated ProtectionDomains.
|
||||||
*
|
*
|
||||||
* @param assignedDomains an array of inherited ProtectionDomains.
|
* @param assignedDomains an array of inherited ProtectionDomains.
|
||||||
* ProtectionDomains may be inherited from a parent thread,
|
|
||||||
* or from a privileged {@code AccessControlContext}.
|
|
||||||
* This parameter may be {@code null}
|
* This parameter may be {@code null}
|
||||||
* if there are no inherited ProtectionDomains.
|
* if there are no inherited ProtectionDomains.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,8 +27,8 @@ package java.security;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A computation to be performed with privileges enabled. The computation is
|
* A computation to be performed by invoking
|
||||||
* performed by invoking {@code AccessController.doPrivileged} on the
|
* {@code AccessController.doPrivileged} on the
|
||||||
* {@code PrivilegedAction} object. This interface is used only for
|
* {@code PrivilegedAction} object. This interface is used only for
|
||||||
* computations that do not throw checked exceptions; computations that
|
* computations that do not throw checked exceptions; computations that
|
||||||
* throw checked exceptions must use {@code PrivilegedExceptionAction}
|
* throw checked exceptions must use {@code PrivilegedExceptionAction}
|
||||||
|
@ -44,7 +44,7 @@ package java.security;
|
||||||
public interface PrivilegedAction<T> {
|
public interface PrivilegedAction<T> {
|
||||||
/**
|
/**
|
||||||
* Performs the computation. This method will be called by
|
* Performs the computation. This method will be called by
|
||||||
* {@code AccessController.doPrivileged} after enabling privileges.
|
* {@code AccessController.doPrivileged}.
|
||||||
*
|
*
|
||||||
* @return a class-dependent value that may represent the results of the
|
* @return a class-dependent value that may represent the results of the
|
||||||
* computation. Each class that implements
|
* computation. Each class that implements
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -63,7 +63,7 @@ public class PrivilegedActionException extends Exception {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the exception thrown by the privileged computation that
|
* Returns the exception thrown by the computation that
|
||||||
* resulted in this {@code PrivilegedActionException}.
|
* resulted in this {@code PrivilegedActionException}.
|
||||||
*
|
*
|
||||||
* @apiNote
|
* @apiNote
|
||||||
|
@ -71,7 +71,7 @@ public class PrivilegedActionException extends Exception {
|
||||||
* The {@link Throwable#getCause()} method is now the preferred means of
|
* The {@link Throwable#getCause()} method is now the preferred means of
|
||||||
* obtaining this information.
|
* obtaining this information.
|
||||||
*
|
*
|
||||||
* @return the exception thrown by the privileged computation that
|
* @return the exception thrown by the computation that
|
||||||
* resulted in this {@code PrivilegedActionException}.
|
* resulted in this {@code PrivilegedActionException}.
|
||||||
* @see PrivilegedExceptionAction
|
* @see PrivilegedExceptionAction
|
||||||
* @see AccessController#doPrivileged(PrivilegedExceptionAction)
|
* @see AccessController#doPrivileged(PrivilegedExceptionAction)
|
||||||
|
@ -90,7 +90,7 @@ public class PrivilegedActionException extends Exception {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The exception thrown by the privileged computation that resulted
|
* The exception thrown by the computation that resulted
|
||||||
* in this {@code PrivilegedActionException}.
|
* in this {@code PrivilegedActionException}.
|
||||||
*
|
*
|
||||||
* @serialField exception Exception the thrown Exception
|
* @serialField exception Exception the thrown Exception
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,8 +27,8 @@ package java.security;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A computation to be performed with privileges enabled, that throws one or
|
* A computation to be performed that throws one or more checked exceptions.
|
||||||
* more checked exceptions. The computation is performed by invoking
|
* The computation is performed by invoking
|
||||||
* {@code AccessController.doPrivileged} on the
|
* {@code AccessController.doPrivileged} on the
|
||||||
* {@code PrivilegedExceptionAction} object. This interface is
|
* {@code PrivilegedExceptionAction} object. This interface is
|
||||||
* used only for computations that throw checked exceptions;
|
* used only for computations that throw checked exceptions;
|
||||||
|
@ -47,7 +47,7 @@ package java.security;
|
||||||
public interface PrivilegedExceptionAction<T> {
|
public interface PrivilegedExceptionAction<T> {
|
||||||
/**
|
/**
|
||||||
* Performs the computation. This method will be called by
|
* Performs the computation. This method will be called by
|
||||||
* {@code AccessController.doPrivileged} after enabling privileges.
|
* {@code AccessController.doPrivileged}.
|
||||||
*
|
*
|
||||||
* @return a class-dependent value that may represent the results of the
|
* @return a class-dependent value that may represent the results of the
|
||||||
* computation. Each class that implements
|
* computation. Each class that implements
|
||||||
|
|
|
@ -453,7 +453,7 @@ public final class Subject implements java.io.Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform privileged work as a particular {@code Subject}.
|
* Perform work as a particular {@code Subject}.
|
||||||
*
|
*
|
||||||
* <p> This method launches {@code action} and binds {@code subject} to
|
* <p> This method launches {@code action} and binds {@code subject} to
|
||||||
* the period of its execution.
|
* the period of its execution.
|
||||||
|
@ -513,7 +513,7 @@ public final class Subject implements java.io.Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform privileged work as a particular {@code Subject}.
|
* Perform work as a particular {@code Subject}.
|
||||||
*
|
*
|
||||||
* <p> This method launches {@code action} and binds {@code subject} to
|
* <p> This method launches {@code action} and binds {@code subject} to
|
||||||
* the period of its execution.
|
* the period of its execution.
|
||||||
|
|
|
@ -112,21 +112,16 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
|
||||||
* In addition, caching of ProtectionDomains may be permitted.
|
* In addition, caching of ProtectionDomains may be permitted.
|
||||||
*
|
*
|
||||||
* @param currentDomains the ProtectionDomains associated with the
|
* @param currentDomains the ProtectionDomains associated with the
|
||||||
* current execution Thread, up to the most recent
|
* current execution Thread.
|
||||||
* privileged {@code ProtectionDomain}.
|
|
||||||
* The ProtectionDomains are listed in order of execution,
|
* The ProtectionDomains are listed in order of execution,
|
||||||
* with the most recently executing {@code ProtectionDomain}
|
* with the most recently executing {@code ProtectionDomain}
|
||||||
* residing at the beginning of the array. This parameter may
|
* residing at the beginning of the array. This parameter may
|
||||||
* be {@code null} if the current execution Thread
|
* be {@code null} if the current execution Thread
|
||||||
* has no associated ProtectionDomains.
|
* has no associated ProtectionDomains.
|
||||||
*
|
*
|
||||||
* @param assignedDomains the ProtectionDomains inherited from the
|
* @param assignedDomains the inherited ProtectionDomains.
|
||||||
* parent Thread, or the ProtectionDomains from the
|
* This parameter may be {@code null}
|
||||||
* privileged {@code context}, if a call to
|
* if there were no inherited ProtectionDomains.
|
||||||
* {@code AccessController.doPrivileged(..., context)}
|
|
||||||
* had occurred This parameter may be {@code null}
|
|
||||||
* if there were no ProtectionDomains inherited from the
|
|
||||||
* parent Thread, or from the privileged {@code context}.
|
|
||||||
*
|
*
|
||||||
* @return a new array consisting of the updated ProtectionDomains,
|
* @return a new array consisting of the updated ProtectionDomains,
|
||||||
* or {@code null}.
|
* or {@code null}.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue