Skip to content

A way to disable the optimization for filling the stack traces #3638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* Internal utility to share a fast implementation of {@code #getCurrentStackTrace()}
* with the java 9 implementation of {@link StackLocator}.
*/
final class PrivateSecurityManagerStackTraceUtil {
public final class PrivateSecurityManagerStackTraceUtil {

private static final PrivateSecurityManager SECURITY_MANAGER;
private static PrivateSecurityManager SECURITY_MANAGER;

static {
PrivateSecurityManager psm;
Expand All @@ -51,6 +51,11 @@ static boolean isEnabled() {
return SECURITY_MANAGER != null;
}

/** Disable the fast stack traces, if already enabled. */
public static void disable() {
SECURITY_MANAGER = null;
}

/**
* Returns the current execution stack as a Deque of classes.
* <p>
Expand Down
Loading