Skip to content

Commit 6aec2dc

Browse files
committedNov 22, 2024
8344788: Specify that the access control context parameters of Subject.doAsPrivileged are ignored
Reviewed-by: alanb
1 parent 079f503 commit 6aec2dc

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed
 

‎src/java.base/share/classes/javax/security/auth/Subject.java

+6-8
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@ public static <T> T doAs(final Subject subject,
474474
/**
475475
* Perform privileged work as a particular {@code Subject}.
476476
*
477-
* <p> This method ignores the {@code acc} argument, launches {@code action},
478-
* and binds {@code subject} to the period of its execution.
477+
* <p> This method launches {@code action} and binds {@code subject} to
478+
* the period of its execution.
479479
*
480480
* @param subject the {@code Subject} that the specified
481481
* {@code action} will run as. This parameter
@@ -487,8 +487,7 @@ public static <T> T doAs(final Subject subject,
487487
* @param action the code to be run as the specified
488488
* {@code Subject}.
489489
*
490-
* @param acc the {@code AccessControlContext} to be tied to the
491-
* specified <i>subject</i> and <i>action</i>.
490+
* @param acc ignored
492491
*
493492
* @return the value returned by the PrivilegedAction's
494493
* {@code run} method.
@@ -540,8 +539,8 @@ public static <T> T doAsPrivileged(final Subject subject,
540539
/**
541540
* Perform privileged work as a particular {@code Subject}.
542541
*
543-
* <p> This method ignores the {@code acc} argument, launches {@code action},
544-
* and binds {@code subject} to the period of its execution.
542+
* <p> This method launches {@code action} and binds {@code subject} to
543+
* the period of its execution.
545544
*
546545
* @param subject the {@code Subject} that the specified
547546
* {@code action} will run as. This parameter
@@ -553,8 +552,7 @@ public static <T> T doAsPrivileged(final Subject subject,
553552
* @param action the code to be run as the specified
554553
* {@code Subject}.
555554
*
556-
* @param acc the {@code AccessControlContext} to be tied to the
557-
* specified <i>subject</i> and <i>action</i>.
555+
* @param acc ignored
558556
*
559557
* @return the value returned by the
560558
* PrivilegedExceptionAction's {@code run} method.

0 commit comments

Comments
 (0)
Please sign in to comment.