< prev index next >

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

Print this page

        

@@ -277,11 +277,11 @@
      *
      * <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")}.
+     * method for {@code RuntimePermission("getStackWalkerWithClassReference")}.
      *
      * @param option {@link Option stack walking option}
      *
      * @return a {@code StackWalker} configured with the given option
      *

@@ -301,11 +301,11 @@
      *
      * <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")}.
+     * method for {@code RuntimePermission("getStackWalkerWithClassReference")}.
      *
      * @param options {@link Option stack walking option}
      *
      * @return a {@code StackWalker} configured with the given options
      *

@@ -331,11 +331,11 @@
      *
      * <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")}.
+     * 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,11 +374,11 @@
     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"));
+                sm.checkPermission(new RuntimePermission("getStackWalkerWithClassReference"));
             }
         }
     }
 
     /*
< prev index next >