8331189: Implementation of Scoped Values (Third Preview)

Reviewed-by: aph, jpai, mcimadamore
This commit is contained in:
Alan Bateman 2024-05-30 15:41:56 +00:00
parent 4acafb809c
commit 707154235b
7 changed files with 96 additions and 268 deletions

View file

@ -436,7 +436,7 @@ public final class Subject implements java.io.Serializable {
Objects.requireNonNull(action);
if (!SharedSecrets.getJavaLangAccess().allowSecurityManager()) {
try {
return ScopedValue.callWhere(SCOPED_SUBJECT, subject, action);
return ScopedValue.callWhere(SCOPED_SUBJECT, subject, action::call);
} catch (Exception e) {
throw new CompletionException(e);
}