Class Java23Subject
java.lang.Object
org.apache.jackrabbit.oak.commons.jdkcompat.Java23Subject
This class contains methods replacing the deprecated
Subject.getSubject(AccessControlContext)
and associated methods, which changed their behavior
with Java 23 (@see https://inside.java/2024/07/08/quality-heads-up).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TdoAs(Subject subject, PrivilegedAction<T> action) static <T> TdoAs(Subject subject, PrivilegedExceptionAction<T> action) static <T> TdoAsPrivileged(Subject subject, PrivilegedAction<T> action, AccessControlContext acc) static <T> TdoAsPrivileged(Subject subject, PrivilegedExceptionAction<T> action, AccessControlContext acc) static Subject
-
Constructor Details
-
Java23Subject
public Java23Subject()
-
-
Method Details
-
getSubject
-
doAs
-
doAsPrivileged
public static <T> T doAsPrivileged(Subject subject, PrivilegedAction<T> action, AccessControlContext acc) -
doAs
public static <T> T doAs(Subject subject, PrivilegedExceptionAction<T> action) throws PrivilegedActionException - Throws:
PrivilegedActionException
-
doAsPrivileged
public static <T> T doAsPrivileged(Subject subject, PrivilegedExceptionAction<T> action, AccessControlContext acc) throws PrivilegedActionException - Throws:
PrivilegedActionException
-