diff --git a/src/java.base/share/classes/java/lang/ModuleLayer.java b/src/java.base/share/classes/java/lang/ModuleLayer.java index b038c1efa275c..814cdeb7e6dc0 100644 --- a/src/java.base/share/classes/java/lang/ModuleLayer.java +++ b/src/java.base/share/classes/java/lang/ModuleLayer.java @@ -305,10 +305,6 @@ public Controller addOpens(Module source, String pn, Module target) { * 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. - * * @param target * The module to update * diff --git a/src/java.base/share/classes/java/lang/foreign/AddressLayout.java b/src/java.base/share/classes/java/lang/foreign/AddressLayout.java index 6c93f4b64edff..3e2e3dc2bc97a 100644 --- a/src/java.base/share/classes/java/lang/foreign/AddressLayout.java +++ b/src/java.base/share/classes/java/lang/foreign/AddressLayout.java @@ -98,10 +98,6 @@ public sealed interface AddressLayout extends ValueLayout permits ValueLayouts.O * AddressLayout unboundedLayout = addressLayout.withTargetLayout( * MemoryLayout.sequenceLayout(Long.MAX_VALUE, ValueLayout.JAVA_BYTE)); *} - * <p> - * This method is <a href="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. * * @param layout the target layout. * @return an address layout with same characteristics as this layout, but with the provided target layout. diff --git a/src/java.base/share/classes/java/lang/foreign/Linker.java b/src/java.base/share/classes/java/lang/foreign/Linker.java index 747e2b9270d29..738ff19a51700 100644 --- a/src/java.base/share/classes/java/lang/foreign/Linker.java +++ b/src/java.base/share/classes/java/lang/foreign/Linker.java @@ -519,10 +519,6 @@ static Linker nativeLinker() { * {@snippet lang=java : * linker.downcallHandle(function).bindTo(symbol); * } - * <p> - * This method is <a href="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. * * @param address the native memory segment whose {@linkplain MemorySegment#address() base address} is the * address of the target foreign function. @@ -575,10 +571,6 @@ static Linker nativeLinker() { * {@link MemorySegment#copy(MemorySegment, long, MemorySegment, long, long)} methods may be thrown. * The returned method handle will additionally throw {@link NullPointerException} if any argument * passed to it is {@code null}. - * <p> - * This method is <a href="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. * * @param function the function descriptor of the target foreign function. * @param options the linker options associated with this linkage request. @@ -612,10 +604,6 @@ static Linker nativeLinker() { * try/catch block to catch any unexpected exceptions. This can be done using the * {@link java.lang.invoke.MethodHandles#catchException(MethodHandle, Class, MethodHandle)} method handle combinator, * and handle exceptions as desired in the corresponding catch block. - * <p> - * This method is <a href="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. * * @param target the target method handle. * @param function the upcall stub function descriptor. diff --git a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java index 724286ce693c0..6dca1b699e79d 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java +++ b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java @@ -587,10 +587,6 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl { /** * Returns a new memory segment that has the same address and scope as this segment, but with the provided size. - * <p> - * This method is <a href="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. * * @param newSize the size of the returned segment. * @return a new memory segment that has the same address and scope as this segment, but the new @@ -620,10 +616,6 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl { * } * That is, the cleanup action receives a segment that is associated with the global scope, * and is accessible from any thread. The size of the segment accepted by the cleanup action is {@link #byteSize()}. - * <p> - * This method is <a href="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. * * @apiNote The cleanup action (if present) should take care not to leak the received segment to external * clients which might access the segment after its backing region of memory is no longer available. Furthermore, @@ -659,10 +651,6 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl { * } * That is, the cleanup action receives a segment that is associated with the global scope, * and is accessible from any thread. The size of the segment accepted by the cleanup action is {@code newSize}. - * <p> - * This method is <a href="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. * * @apiNote The cleanup action (if present) should take care not to leak the received segment to external * clients which might access the segment after its backing region of memory is no longer available. Furthermore, diff --git a/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java b/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java index 632543c995782..efab47a40f2c4 100644 --- a/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java +++ b/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java @@ -211,10 +211,6 @@ static SymbolLookup loaderLookup() { * For instance, if the provided arena is a confined arena, the library * associated with the returned lookup will be unloaded when the provided confined arena is * {@linkplain Arena#close() closed}. - * <p> - * This method is <a href="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. * * @implNote The process of resolving a library name is OS-specific. For instance, in a POSIX-compliant OS, * the library name is resolved according to the specification of the {@code dlopen} function for that OS. @@ -245,10 +241,6 @@ static SymbolLookup libraryLookup(String name, Arena arena) { * For instance, if the provided arena is a confined arena, the library * associated with the returned lookup will be unloaded when the provided confined arena is * {@linkplain Arena#close() closed}. - * <p> - * This method is <a href="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. * * @implNote On Linux, the functionalities provided by this factory method and the returned symbol lookup are * implemented using the {@code dlopen}, {@code dlsym} and {@code dlclose} functions.