8277932: Subject:callAs() not throwing NPE when action is null
Reviewed-by: rriggs
This commit is contained in:
parent
f148e3e462
commit
10db0e4163
@ -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…
x
Reference in New Issue
Block a user