< prev index next >

jdk/src/java.base/share/classes/java/lang/StackWalker.java

Print this page

        

*** 277,287 **** * * <p> * If a security manager is present and the given {@code option} is * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} ! * method for {@code StackFramePermission("retainClassReference")}. * * @param option {@link Option stack walking option} * * @return a {@code StackWalker} configured with the given option * --- 277,287 ---- * * <p> * If a security manager is present and the given {@code option} is * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} ! * method for {@code RuntimePermission("getStackWalkerWithClassReference")}. * * @param option {@link Option stack walking option} * * @return a {@code StackWalker} configured with the given option *
*** 301,311 **** * * <p> * If a security manager is present and the given {@code options} contains * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} ! * method for {@code StackFramePermission("retainClassReference")}. * * @param options {@link Option stack walking option} * * @return a {@code StackWalker} configured with the given options * --- 301,311 ---- * * <p> * If a security manager is present and the given {@code options} contains * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} ! * method for {@code RuntimePermission("getStackWalkerWithClassReference")}. * * @param options {@link Option stack walking option} * * @return a {@code StackWalker} configured with the given options *
*** 331,341 **** * * <p> * If a security manager is present and the given {@code options} contains * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} ! * method for {@code StackFramePermission("retainClassReference")}. * * <p> * The {@code estimateDepth} specifies the estimate number of stack frames * this {@code StackWalker} will traverse that the {@code StackWalker} could * use as a hint for the buffer size. --- 331,341 ---- * * <p> * If a security manager is present and the given {@code options} contains * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} ! * method for {@code RuntimePermission("getStackWalkerWithClassReference")}. * * <p> * The {@code estimateDepth} specifies the estimate number of stack frames * this {@code StackWalker} will traverse that the {@code StackWalker} could * use as a hint for the buffer size.
*** 374,384 **** private static void checkPermission(Set<Option> options) { Objects.requireNonNull(options); SecurityManager sm = System.getSecurityManager(); if (sm != null) { if (options.contains(Option.RETAIN_CLASS_REFERENCE)) { ! sm.checkPermission(new StackFramePermission("retainClassReference")); } } } /* --- 374,384 ---- private static void checkPermission(Set<Option> options) { Objects.requireNonNull(options); SecurityManager sm = System.getSecurityManager(); if (sm != null) { if (options.contains(Option.RETAIN_CLASS_REFERENCE)) { ! sm.checkPermission(new RuntimePermission("getStackWalkerWithClassReference")); } } } /*
< prev index next >