8341903: Implementation of Scoped Values (Fourth Preview)

Reviewed-by: alanb
This commit is contained in:
Andrew Haley 2024-11-05 17:12:17 +00:00
parent 839de82c31
commit 3fab8e37bb
7 changed files with 88 additions and 157 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::call);
return ScopedValue.where(SCOPED_SUBJECT, subject).call(action::call);
} catch (Exception e) {
throw new CompletionException(e);
}