mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8284851: Update javax.crypto files to use proper javadoc for mentioned classes
Reviewed-by: weijun, valeriep
This commit is contained in:
parent
8cdead0c94
commit
f804f2ce8e
92 changed files with 2142 additions and 2010 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -41,10 +41,10 @@ import jdk.internal.vm.annotation.ForceInline;
|
|||
import jdk.internal.vm.annotation.ReservedStackAccess;
|
||||
|
||||
/**
|
||||
* <p> The AccessController class is used for access control operations
|
||||
* <p> The {@code AccessController} class is used for access control operations
|
||||
* and decisions.
|
||||
*
|
||||
* <p> More specifically, the AccessController class is used for
|
||||
* <p> More specifically, the {@code AccessController} class is used for
|
||||
* three purposes:
|
||||
*
|
||||
* <ul>
|
||||
|
@ -73,8 +73,8 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
|
|||
*
|
||||
* <p> If a requested access is allowed,
|
||||
* {@code checkPermission} returns quietly. If denied, an
|
||||
* AccessControlException is
|
||||
* thrown. AccessControlException can also be thrown if the requested
|
||||
* {@code AccessControlException} is
|
||||
* thrown. {@code AccessControlException} can also be thrown if the requested
|
||||
* permission is of an incorrect type or contains an invalid value.
|
||||
* Such information is given whenever possible.
|
||||
*
|
||||
|
@ -147,15 +147,15 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
|
|||
* }}</pre>
|
||||
*
|
||||
* <p>
|
||||
* PrivilegedAction is an interface with a single method, named
|
||||
* {@code PrivilegedAction} is an interface with a single method, named
|
||||
* {@code run}.
|
||||
* The above example shows creation of an implementation
|
||||
* of that interface; a concrete implementation of the
|
||||
* {@code run} method is supplied.
|
||||
* When the call to {@code doPrivileged} is made, an
|
||||
* instance of the PrivilegedAction implementation is passed
|
||||
* instance of the {@code PrivilegedAction} implementation is passed
|
||||
* to it. The {@code doPrivileged} method calls the
|
||||
* {@code run} method from the PrivilegedAction
|
||||
* {@code run} method from the {@code PrivilegedAction}
|
||||
* implementation after enabling privileges, and returns the
|
||||
* {@code run} method's return value as the
|
||||
* {@code doPrivileged} return value (which is
|
||||
|
@ -212,10 +212,10 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
|
|||
* will actually need to be done from within a
|
||||
* <i>different</i> context (for example, from within a worker thread).
|
||||
* The {@link #getContext() getContext} method and
|
||||
* AccessControlContext class are provided
|
||||
* {@code AccessControlContext} class are provided
|
||||
* for this situation. The {@code getContext} method takes a "snapshot"
|
||||
* of the current calling context, and places
|
||||
* it in an AccessControlContext object, which it returns. A sample call is
|
||||
* it in an {@code AccessControlContext} object, which it returns. A sample call is
|
||||
* the following:
|
||||
*
|
||||
* <pre>
|
||||
|
@ -225,11 +225,11 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
|
|||
* </pre>
|
||||
*
|
||||
* <p>
|
||||
* AccessControlContext itself has a {@code checkPermission} method
|
||||
* {@code AccessControlContext} itself has a {@code checkPermission} method
|
||||
* that makes access decisions based on the context <i>it</i> encapsulates,
|
||||
* rather than that of the current execution thread.
|
||||
* Code within a different context can thus call that method on the
|
||||
* previously-saved AccessControlContext object. A sample call is the
|
||||
* previously-saved {@code AccessControlContext} object. A sample call is the
|
||||
* following:
|
||||
*
|
||||
* <pre>
|
||||
|
@ -240,8 +240,8 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
|
|||
*
|
||||
* <p> There are also times where you don't know a priori which permissions
|
||||
* to check the context against. In these cases you can use the
|
||||
* doPrivileged method that takes a context. You can also limit the scope
|
||||
* of the privileged code by passing additional {@code Permission}
|
||||
* {@code doPrivileged} method that takes a context. You can also limit the
|
||||
* scope of the privileged code by passing additional {@code Permission}
|
||||
* parameters.
|
||||
*
|
||||
* <pre> {@code
|
||||
|
@ -282,7 +282,7 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
|
|||
public final class AccessController {
|
||||
|
||||
/**
|
||||
* Don't allow anyone to instantiate an AccessController
|
||||
* Don't allow anyone to instantiate an {@code AccessController}
|
||||
*/
|
||||
private AccessController() { }
|
||||
|
||||
|
@ -294,8 +294,9 @@ public final class AccessController {
|
|||
* <p> If the action's {@code run} method throws an (unchecked)
|
||||
* exception, it will propagate through this method.
|
||||
*
|
||||
* <p> Note that any DomainCombiner associated with the current
|
||||
* AccessControlContext will be ignored while the action is performed.
|
||||
* <p> Note that any {@code DomainCombiner} associated with the current
|
||||
* {@code AccessControlContext} will be ignored while the action is
|
||||
* performed.
|
||||
*
|
||||
* @param <T> the type of the value returned by the PrivilegedAction's
|
||||
* {@code run} method.
|
||||
|
@ -327,7 +328,7 @@ public final class AccessController {
|
|||
* exception, it will propagate through this method.
|
||||
*
|
||||
* <p> This method preserves the current AccessControlContext's
|
||||
* DomainCombiner (which may be null) while the action is performed.
|
||||
* {@code DomainCombiner} (which may be null) while the action is performed.
|
||||
*
|
||||
* @param <T> the type of the value returned by the PrivilegedAction's
|
||||
* {@code run} method.
|
||||
|
@ -477,7 +478,7 @@ public final class AccessController {
|
|||
* it will propagate through this method.
|
||||
*
|
||||
* <p> This method preserves the current AccessControlContext's
|
||||
* DomainCombiner (which may be null) while the action is performed.
|
||||
* {@code DomainCombiner} (which may be null) while the action is performed.
|
||||
* <p>
|
||||
* If a security manager is installed and the specified
|
||||
* {@code AccessControlContext} was not created by system code and the
|
||||
|
@ -538,8 +539,9 @@ public final class AccessController {
|
|||
* <p> If the action's {@code run} method throws an <i>unchecked</i>
|
||||
* exception, it will propagate through this method.
|
||||
*
|
||||
* <p> Note that any DomainCombiner associated with the current
|
||||
* AccessControlContext will be ignored while the action is performed.
|
||||
* <p> Note that any {@code DomainCombiner} associated with the current
|
||||
* {@code AccessControlContext} will be ignored while the action is
|
||||
* performed.
|
||||
*
|
||||
* @param <T> the type of the value returned by the
|
||||
* PrivilegedExceptionAction's {@code run} method.
|
||||
|
@ -583,7 +585,7 @@ public final class AccessController {
|
|||
* exception, it will propagate through this method.
|
||||
*
|
||||
* <p> This method preserves the current AccessControlContext's
|
||||
* DomainCombiner (which may be null) while the action is performed.
|
||||
* {@code DomainCombiner} (which may be null) while the action is performed.
|
||||
*
|
||||
* @param <T> the type of the value returned by the
|
||||
* PrivilegedExceptionAction's {@code run} method.
|
||||
|
@ -744,7 +746,7 @@ public final class AccessController {
|
|||
/**
|
||||
* Sanity check that the caller context is indeed privileged.
|
||||
*
|
||||
* Used by executePrivileged to make sure the frame is properly
|
||||
* Used by {@code executePrivileged} to make sure the frame is properly
|
||||
* recognized by the VM.
|
||||
*/
|
||||
private static boolean isPrivileged() {
|
||||
|
@ -907,7 +909,7 @@ public final class AccessController {
|
|||
* it will propagate through this method.
|
||||
*
|
||||
* <p> This method preserves the current AccessControlContext's
|
||||
* DomainCombiner (which may be null) while the action is performed.
|
||||
* {@code DomainCombiner} (which may be null) while the action is performed.
|
||||
* <p>
|
||||
* If a security manager is installed and the specified
|
||||
* {@code AccessControlContext} was not created by system code and the
|
||||
|
@ -964,13 +966,13 @@ public final class AccessController {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the AccessControl context. i.e., it gets
|
||||
* Returns the {@code AccessControlContext}. i.e., it gets
|
||||
* the protection domains of all the callers on the stack,
|
||||
* starting at the first class with a non-null
|
||||
* ProtectionDomain.
|
||||
* {@code ProtectionDomain}.
|
||||
*
|
||||
* @return the access control context based on the current stack or
|
||||
* null if there was only privileged system code.
|
||||
* {@code null} if there was only privileged system code.
|
||||
*/
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
|
@ -978,9 +980,9 @@ public final class AccessController {
|
|||
|
||||
|
||||
/**
|
||||
* Returns the "inherited" AccessControl context. This is the context
|
||||
* Returns the "inherited" {@code AccessControlContext}. This is the context
|
||||
* that existed when the thread was created. Package private so
|
||||
* AccessControlContext can use it.
|
||||
* {@code AccessControlContext} can use it.
|
||||
*/
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
|
@ -988,13 +990,14 @@ public final class AccessController {
|
|||
|
||||
/**
|
||||
* This method takes a "snapshot" of the current calling context, which
|
||||
* includes the current Thread's inherited AccessControlContext and any
|
||||
* limited privilege scope, and places it in an AccessControlContext object.
|
||||
* includes the current thread's inherited {@code AccessControlContext}
|
||||
* and any limited privilege scope, and places it in an
|
||||
* {@code AccessControlContext} object.
|
||||
* This context may then be checked at a later point, possibly in another thread.
|
||||
*
|
||||
* @see AccessControlContext
|
||||
*
|
||||
* @return the AccessControlContext based on the current context.
|
||||
* @return the {@code AccessControlContext} based on the current context.
|
||||
*/
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
|
@ -1013,11 +1016,11 @@ public final class AccessController {
|
|||
/**
|
||||
* Determines whether the access request indicated by the
|
||||
* specified permission should be allowed or denied, based on
|
||||
* the current AccessControlContext and security policy.
|
||||
* the current {@code AccessControlContext} and security policy.
|
||||
* This method quietly returns if the access request
|
||||
* is permitted, or throws an AccessControlException otherwise. The
|
||||
* getPermission method of the AccessControlException returns the
|
||||
* {@code perm} Permission object instance.
|
||||
* is permitted, or throws an {@code AccessControlException} otherwise. The
|
||||
* {@code getPermission} method of the {@code AccessControlException}
|
||||
* returns the {@code Permission} object instance ({@code perm}}.
|
||||
*
|
||||
* @param perm the requested permission.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue