8289930: Improve Thread description of inherited AccessControlContext

Reviewed-by: jpai, mchung
This commit is contained in:
Alan Bateman 2022-07-12 14:46:15 +00:00
parent 4545ed6842
commit 59d0c739ac

View File

@ -170,13 +170,13 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS;
* <p> Platform threads inherit the daemon status, thread priority, and when not
* provided (or not selected by a security manager), the thread group.
*
* <p> Inherited Access Control Context:
* Creating a platform thread {@linkplain AccessController#getContext() captures} the
* <p> Creating a platform thread {@linkplain AccessController#getContext() captures} the
* {@linkplain AccessControlContext caller context} to limit the {@linkplain Permission
* permissions} of {@linkplain AccessController#doPrivileged(PrivilegedAction) privileged
* actions} performed by code in the thread. Creating a virtual thread does not capture
* the caller context; virtual threads have no permissions when executing code that
* performs privileged actions.
* permissions} of the new thread when it executes code that performs a {@linkplain
* AccessController#doPrivileged(PrivilegedAction) privileged action}. The captured
* caller context is the new thread's "Inherited {@link AccessControlContext}". Creating
* a virtual thread does not capture the caller context; virtual threads have no
* permissions when executing code that performs a privileged action.
*
* <p> Unless otherwise specified, passing a {@code null} argument to a constructor
* or method in this class will cause a {@link NullPointerException} to be thrown.