mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8331189: Implementation of Scoped Values (Third Preview)
Reviewed-by: aph, jpai, mcimadamore
This commit is contained in:
parent
4acafb809c
commit
707154235b
7 changed files with 96 additions and 268 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue