mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8277932: Subject:callAs() not throwing NPE when action is null
Reviewed-by: rriggs
This commit is contained in:
parent
f148e3e462
commit
10db0e4163
1 changed files with 1 additions and 0 deletions
|
@ -402,6 +402,7 @@ public final class Subject implements java.io.Serializable {
|
|||
*/
|
||||
public static <T> T callAs(final Subject subject,
|
||||
final Callable<T> action) throws CompletionException {
|
||||
Objects.requireNonNull(action);
|
||||
if (USE_TL) {
|
||||
Subject oldSubject = SUBJECT_THREAD_LOCAL.get();
|
||||
SUBJECT_THREAD_LOCAL.set(subject);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue