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 ed416cf1eb1..d192c46148a 100644 --- a/src/java.base/share/classes/java/lang/foreign/Linker.java +++ b/src/java.base/share/classes/java/lang/foreign/Linker.java @@ -592,7 +592,7 @@ public sealed interface Linker permits AbstractLinker { } /** - * {@return A linker option used to save portions of the execution state immediately after + * {@return a linker option used to save portions of the execution state immediately after * calling a foreign function associated with a downcall method handle, * before it can be overwritten by the Java runtime, or read through conventional means} *
@@ -640,7 +640,7 @@ public sealed interface Linker permits AbstractLinker { } /** - * {@return A struct layout that represents the layout of the capture state segment that is passed + * {@return a struct layout that represents the layout of the capture state segment that is passed * to a downcall handle linked with {@link #captureCallState(String...)}}. *
* The capture state layout is platform dependent but is guaranteed to be @@ -668,7 +668,7 @@ public sealed interface Linker permits AbstractLinker { } /** - * {@return A linker option used to mark a foreign function as trivial} + * {@return a linker option used to mark a foreign function as trivial} *
* A trivial function is a function that has an extremely short running time * in all cases (similar to calling an empty function), and does not call back into Java (e.g. using an upcall stub). 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 becb3c05f0e..7797918a82d 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java +++ b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java @@ -618,11 +618,6 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl { * if the provided scope is the scope of an {@linkplain Arena#ofAuto() automatic arena}, the cleanup action * must not prevent the scope from becoming unreachable. * A failure to do so will permanently prevent the regions of memory allocated by the automatic arena from being deallocated. - *
- * This method is restricted. - * 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. * * @param arena the arena to be associated with the returned segment. * @param cleanup the cleanup action that should be executed when the provided arena is closed (can be {@code null}).