Skip to content
Permalink
Browse files
8277932: Subject:callAs() not throwing NPE when action is null
Reviewed-by: rriggs
  • Loading branch information
wangweij committed Dec 7, 2021
1 parent f148e3e commit 10db0e41634b62be5c1a931bd54ac4260108670d
Showing 1 changed file with 1 addition and 0 deletions.
@@ -402,6 +402,7 @@ public static Subject current() {
*/
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);

1 comment on commit 10db0e4

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 10db0e4 Dec 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.