--- old/src/share/classes/java/security/AccessController.java 2013-06-28 10:31:32.418377197 -0700 +++ new/src/share/classes/java/security/AccessController.java 2013-06-28 10:31:32.210377202 -0700 @@ -49,7 +49,7 @@ *

The {@link #checkPermission(Permission) checkPermission} method * determines whether the access request indicated by a specified * permission should be granted or denied. A sample call appears - * below. In this example, checkPermission will determine + * below. In this example, {@code checkPermission} will determine * whether or not to grant "read" access to the file named "testFile" in * the "/temp" directory. * @@ -61,7 +61,7 @@ * * *

If a requested access is allowed, - * checkPermission returns quietly. If denied, an + * {@code checkPermission} returns quietly. If denied, an * AccessControlException is * thrown. AccessControlException can also be thrown if the requested * permission is of an incorrect type or contains an invalid value. @@ -69,8 +69,8 @@ * * Suppose the current thread traversed m callers, in the order of caller 1 * to caller 2 to caller m. Then caller m invoked the - * checkPermission method. - * The checkPermission method determines whether access + * {@code checkPermission} method. + * The {@code checkPermission} method determines whether access * is granted or denied based on the following algorithm: * *

 {@code
@@ -102,20 +102,20 @@
  *
  * 

A caller can be marked as being "privileged" * (see {@link #doPrivileged(PrivilegedAction) doPrivileged} and below). - * When making access control decisions, the checkPermission + * When making access control decisions, the {@code checkPermission} * method stops checking if it reaches a caller that - * was marked as "privileged" via a doPrivileged + * was marked as "privileged" via a {@code doPrivileged} * call without a context argument (see below for information about a * context argument). If that caller's domain has the * specified permission and at least one limiting permission argument (if any) * implies the requested permission, no further checking is done and - * checkPermission + * {@code checkPermission} * returns quietly, indicating that the requested access is allowed. * If that domain does not have the specified permission, an exception * is thrown, as usual. If the caller's domain had the specified permission * but it was not implied by any limiting permission arguments given in the call - * to doPrivileged then the permission checking continues - * until there are no more callers or another doPrivileged + * to {@code doPrivileged} then the permission checking continues + * until there are no more callers or another {@code doPrivileged} * call matches the requested permission and returns normally. * *

The normal use of the "privileged" feature is as follows. If you @@ -137,17 +137,17 @@ * *

* PrivilegedAction is an interface with a single method, named - * run. + * {@code run}. * The above example shows creation of an implementation * of that interface; a concrete implementation of the - * run method is supplied. - * When the call to doPrivileged is made, an + * {@code run} method is supplied. + * When the call to {@code doPrivileged} is made, an * instance of the PrivilegedAction implementation is passed - * to it. The doPrivileged method calls the - * run method from the PrivilegedAction + * to it. The {@code doPrivileged} method calls the + * {@code run} method from the PrivilegedAction * implementation after enabling privileges, and returns the - * run method's return value as the - * doPrivileged return value (which is + * {@code run} method's return value as the + * {@code doPrivileged} return value (which is * ignored in this example). * *

If you need to return a value, you can do something like the following: @@ -164,11 +164,11 @@ * ...normal code here... * }}

* - *

If the action performed in your run method could - * throw a "checked" exception (those listed in the throws clause + *

If the action performed in your {@code run} method could + * throw a "checked" exception (those listed in the {@code throws} clause * of a method), then you need to use the - * PrivilegedExceptionAction interface instead of the - * PrivilegedAction interface: + * {@code PrivilegedExceptionAction} interface instead of the + * {@code PrivilegedAction} interface: * *

 {@code
  * somemethod() throws FileNotFoundException {
@@ -191,18 +191,18 @@
  *
  * 

Be *very* careful in your use of the "privileged" construct, and * always remember to make the privileged code section as small as possible. - * You can pass Permission arguments to further limit the + * You can pass {@code Permission} arguments to further limit the * scope of the "privilege" (see below). * * - *

Note that checkPermission always performs security checks + *

Note that {@code checkPermission} always performs security checks * within the context of the currently executing thread. * Sometimes a security check that should be made within a given context * will actually need to be done from within a * different context (for example, from within a worker thread). * The {@link #getContext() getContext} method and * AccessControlContext class are provided - * for this situation. The getContext method takes a "snapshot" + * 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 * the following: @@ -214,7 +214,7 @@ *

* *

- * AccessControlContext itself has a checkPermission method + * AccessControlContext itself has a {@code checkPermission} method * that makes access decisions based on the context it encapsulates, * rather than that of the current execution thread. * Code within a different context can thus call that method on the @@ -230,7 +230,7 @@ *

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 Permission + * of the privileged code by passing additional {@code Permission} * parameters. * *

 {@code
@@ -248,12 +248,12 @@
  *     }, acc, new FilePermission("/temp/*", read));
  *     ...normal code here...
  * }}
- *

Passing a limiting Permission argument of an instance of - * AllPermission is equivalent to calling the equivalent - * doPrivileged method without limiting Permission - * arguments. Passing a zero length array of Permission disables + *

Passing a limiting {@code Permission} argument of an instance of + * {@code AllPermission} is equivalent to calling the equivalent + * {@code doPrivileged} method without limiting {@code Permission} + * arguments. Passing a zero length array of {@code Permission} disables * the code privileges so that checking always continues beyond the caller of - * that doPrivileged method. + * that {@code doPrivileged} method. * * @see AccessControlContext * @@ -269,11 +269,11 @@ private AccessController() { } /** - * Performs the specified PrivilegedAction with privileges + * Performs the specified {@code PrivilegedAction} with privileges * enabled. The action is performed with all of the permissions * possessed by the caller's protection domain. * - *

If the action's run method throws an (unchecked) + *

If the action's {@code run} method throws an (unchecked) * exception, it will propagate through this method. * *

Note that any DomainCombiner associated with the current @@ -281,9 +281,9 @@ * * @param action the action to be performed. * - * @return the value returned by the action's run method. + * @return the value returned by the action's {@code run} method. * - * @exception NullPointerException if the action is null + * @exception NullPointerException if the action is {@code null} * * @see #doPrivileged(PrivilegedAction,AccessControlContext) * @see #doPrivileged(PrivilegedExceptionAction) @@ -295,11 +295,11 @@ public static native T doPrivileged(PrivilegedAction action); /** - * Performs the specified PrivilegedAction with privileges + * Performs the specified {@code PrivilegedAction} with privileges * enabled. The action is performed with all of the permissions * possessed by the caller's protection domain. * - *

If the action's run method throws an (unchecked) + *

If the action's {@code run} method throws an (unchecked) * exception, it will propagate through this method. * *

This method preserves the current AccessControlContext's @@ -307,9 +307,9 @@ * * @param action the action to be performed. * - * @return the value returned by the action's run method. + * @return the value returned by the action's {@code run} method. * - * @exception NullPointerException if the action is null + * @exception NullPointerException if the action is {@code null} * * @see #doPrivileged(PrivilegedAction) * @see java.security.DomainCombiner @@ -364,17 +364,17 @@ /** - * Performs the specified PrivilegedAction with privileges + * Performs the specified {@code PrivilegedAction} with privileges * enabled and restricted by the specified - * AccessControlContext and with a privilege scope limited - * by specified Permission arguments. + * {@code AccessControlContext} and with a privilege scope limited + * by specified {@code Permission} arguments. * * The action is performed with the intersection of the permissions * possessed by the caller's protection domain, and those possessed * by the domains represented by the specified - * AccessControlContext. + * {@code AccessControlContext}. *

- * If the action's run method throws an (unchecked) exception, + * If the action's {@code run} method throws an (unchecked) exception, * it will propagate through this method. * * @param action the action to be performed. @@ -382,16 +382,16 @@ * representing the restriction to be applied to the * caller's domain's privileges before performing * the specified action. If the context is - * null, + * {@code null}, * then no additional restriction is applied. - * @param perms the Permission arguments which limit the + * @param perms the {@code Permission} arguments which limit the * scope of the caller's privileges. The number of arguments * is variable. * - * @return the value returned by the action's run method. + * @return the value returned by the action's {@code run} method. * * @throws NullPointerException if action or perms or any element of - * perms is null + * perms is {@code null} * * @see #doPrivileged(PrivilegedAction) * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext) @@ -413,17 +413,17 @@ /** - * Performs the specified PrivilegedAction with privileges + * Performs the specified {@code PrivilegedAction} with privileges * enabled and restricted by the specified - * AccessControlContext and with a privilege scope limited - * by specified Permission arguments. + * {@code AccessControlContext} and with a privilege scope limited + * by specified {@code Permission} arguments. * * The action is performed with the intersection of the permissions * possessed by the caller's protection domain, and those possessed * by the domains represented by the specified - * AccessControlContext. + * {@code AccessControlContext}. *

- * If the action's run method throws an (unchecked) exception, + * If the action's {@code run} method throws an (unchecked) exception, * it will propagate through this method. * *

This method preserves the current AccessControlContext's @@ -434,16 +434,16 @@ * representing the restriction to be applied to the * caller's domain's privileges before performing * the specified action. If the context is - * null, + * {@code null}, * then no additional restriction is applied. - * @param perms the Permission arguments which limit the + * @param perms the {@code Permission} arguments which limit the * scope of the caller's privileges. The number of arguments * is variable. * - * @return the value returned by the action's run method. + * @return the value returned by the action's {@code run} method. * * @throws NullPointerException if action or perms or any element of - * perms is null + * perms is {@code null} * * @see #doPrivileged(PrivilegedAction) * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext) @@ -469,11 +469,11 @@ } /** - * Performs the specified PrivilegedExceptionAction with + * Performs the specified {@code PrivilegedExceptionAction} with * privileges enabled. The action is performed with all of the * permissions possessed by the caller's protection domain. * - *

If the action's run method throws an unchecked + *

If the action's {@code run} method throws an unchecked * exception, it will propagate through this method. * *

Note that any DomainCombiner associated with the current @@ -481,11 +481,11 @@ * * @param action the action to be performed * - * @return the value returned by the action's run method + * @return the value returned by the action's {@code run} method * * @exception PrivilegedActionException if the specified action's - * run method threw a checked exception - * @exception NullPointerException if the action is null + * {@code run} method threw a checked exception + * @exception NullPointerException if the action is {@code null} * * @see #doPrivileged(PrivilegedAction) * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext) @@ -499,11 +499,11 @@ /** - * Performs the specified PrivilegedExceptionAction with + * Performs the specified {@code PrivilegedExceptionAction} with * privileges enabled. The action is performed with all of the * permissions possessed by the caller's protection domain. * - *

If the action's run method throws an unchecked + *

If the action's {@code run} method throws an unchecked * exception, it will propagate through this method. * *

This method preserves the current AccessControlContext's @@ -511,11 +511,11 @@ * * @param action the action to be performed. * - * @return the value returned by the action's run method + * @return the value returned by the action's {@code run} method * * @exception PrivilegedActionException if the specified action's - * run method threw a checked exception - * @exception NullPointerException if the action is null + * {@code run} method threw a checked exception + * @exception NullPointerException if the action is {@code null} * * @see #doPrivileged(PrivilegedAction) * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext) @@ -609,17 +609,17 @@ /** - * Performs the specified PrivilegedExceptionAction with + * Performs the specified {@code PrivilegedExceptionAction} with * privileges enabled and restricted by the specified - * AccessControlContext and with a privilege scope limited by - * specified Permission arguments. + * {@code AccessControlContext} and with a privilege scope limited by + * specified {@code Permission} arguments. * * The action is performed with the intersection of the permissions * possessed by the caller's protection domain, and those possessed * by the domains represented by the specified - * AccessControlContext. + * {@code AccessControlContext}. *

- * If the action's run method throws an (unchecked) exception, + * If the action's {@code run} method throws an (unchecked) exception, * it will propagate through this method. * * @param action the action to be performed. @@ -627,18 +627,18 @@ * representing the restriction to be applied to the * caller's domain's privileges before performing * the specified action. If the context is - * null, + * {@code null}, * then no additional restriction is applied. - * @param perms the Permission arguments which limit the + * @param perms the {@code Permission} arguments which limit the * scope of the caller's privileges. The number of arguments * is variable. * - * @return the value returned by the action's run method. + * @return the value returned by the action's {@code run} method. * * @throws PrivilegedActionException if the specified action's - * run method threw a checked exception + * {@code run} method threw a checked exception * @throws NullPointerException if action or perms or any element of - * perms is null + * perms is {@code null} * * @see #doPrivileged(PrivilegedAction) * @see #doPrivileged(PrivilegedAction,AccessControlContext) @@ -660,17 +660,17 @@ /** - * Performs the specified PrivilegedExceptionAction with + * Performs the specified {@code PrivilegedExceptionAction} with * privileges enabled and restricted by the specified - * AccessControlContext and with a privilege scope limited by - * specified Permission arguments. + * {@code AccessControlContext} and with a privilege scope limited by + * specified {@code Permission} arguments. * * The action is performed with the intersection of the permissions * possessed by the caller's protection domain, and those possessed * by the domains represented by the specified - * AccessControlContext. + * {@code AccessControlContext}. *

- * If the action's run method throws an (unchecked) exception, + * If the action's {@code run} method throws an (unchecked) exception, * it will propagate through this method. * *

This method preserves the current AccessControlContext's @@ -681,18 +681,18 @@ * representing the restriction to be applied to the * caller's domain's privileges before performing * the specified action. If the context is - * null, + * {@code null}, * then no additional restriction is applied. - * @param perms the Permission arguments which limit the + * @param perms the {@code Permission} arguments which limit the * scope of the caller's privileges. The number of arguments * is variable. * - * @return the value returned by the action's run method. + * @return the value returned by the action's {@code run} method. * * @throws PrivilegedActionException if the specified action's - * run method threw a checked exception + * {@code run} method threw a checked exception * @throws NullPointerException if action or perms or any element of - * perms is null + * perms is {@code null} * * @see #doPrivileged(PrivilegedAction) * @see #doPrivileged(PrivilegedAction,AccessControlContext) @@ -770,14 +770,14 @@ * This method quietly returns if the access request * is permitted, or throws an AccessControlException otherwise. The * getPermission method of the AccessControlException returns the - * perm Permission object instance. + * {@code perm} Permission object instance. * * @param perm the requested permission. * * @exception AccessControlException if the specified permission * is not permitted, based on the current security policy. * @exception NullPointerException if the specified permission - * is null and is checked based on the + * is {@code null} and is checked based on the * security policy currently in effect. */