< prev index next >

src/java.base/share/classes/java/lang/ModuleLayer.java

Print this page
@@ -304,13 +304,11 @@
           * Enables native access for a module in the layer if the caller's module
           * has native access.
           *
           * <p> This method is <a href="foreign/package-summary.html#restricted"><em>restricted</em></a>.
           * Restricted methods are unsafe, and, if used incorrectly, their use might crash
-          * the JVM or, worse, silently result in memory corruption. Thus, clients should refrain
-          * from depending on restricted methods, and use safe and supported functionalities,
-          * where possible.
+          * the JVM or, worse, silently result in memory corruption.
           *
           * @param  target
           *         The module to update
           *
           * @return This controller

@@ -319,13 +317,12 @@
           *         If {@code target} is not in the module layer
           *
           * @throws IllegalCallerException
           *         If the caller is in a module that does not have native access enabled
           *
-          * @since 20
+          * @since 22
           */
-         @PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)
          @CallerSensitive
          public Controller enableNativeAccess(Module target) {
              ensureInLayer(target);
              Reflection.ensureNativeAccess(Reflection.getCallerClass(), Module.class,
                  "enableNativeAccess");
< prev index next >