< prev index next > src/java.base/share/classes/javax/security/auth/Subject.java
Print this page
* not installed or the current subject is set to {@code null}.
* @see #callAs(Subject, Callable)
* @since 18
*/
public static Subject current() {
! return SCOPED_SUBJECT.orElse(null);
}
/**
* Executes a {@code Callable} with {@code subject} as the
* current subject.
* not installed or the current subject is set to {@code null}.
* @see #callAs(Subject, Callable)
* @since 18
*/
public static Subject current() {
! return SCOPED_SUBJECT.isBound() ? SCOPED_SUBJECT.get() : null;
}
/**
* Executes a {@code Callable} with {@code subject} as the
* current subject.
< prev index next >