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 ded175571be..137152d78cc 100644 --- a/src/java.base/share/classes/java/lang/foreign/AddressLayout.java +++ b/src/java.base/share/classes/java/lang/foreign/AddressLayout.java @@ -100,7 +100,7 @@ public sealed interface AddressLayout extends ValueLayout permits ValueLayouts.O *} * * @param layout the target layout. - * @return an address layout with same characteristics as this layout, but with the provided target layout. + * @return an address layout with the same characteristics as this layout, but with the provided target layout. * @throws IllegalCallerException If the caller is in a module that does not have native access enabled * @see #targetLayout() */ @@ -114,7 +114,7 @@ public sealed interface AddressLayout extends ValueLayout permits ValueLayouts.O * * @apiNote This can be useful to compare two address layouts that have different target layouts, but are otherwise equal. * - * @return an address layout with same characteristics as this layout, but with no target layout. + * @return an address layout with the same characteristics as this layout, but with no target layout. * @see #targetLayout() */ AddressLayout withoutTargetLayout(); diff --git a/src/java.base/share/classes/java/lang/foreign/Arena.java b/src/java.base/share/classes/java/lang/foreign/Arena.java index f25b54a6b29..cdd5019b53d 100644 --- a/src/java.base/share/classes/java/lang/foreign/Arena.java +++ b/src/java.base/share/classes/java/lang/foreign/Arena.java @@ -246,7 +246,7 @@ public interface Arena extends SegmentAllocator, AutoCloseable { * The returned segment is associated with this {@linkplain #scope() arena scope}. * The segment's {@link MemorySegment#address() address} is the starting address of the * allocated off-heap region of memory backing the segment, and the address is - * aligned according the provided alignment constraint. + * aligned according to the provided alignment constraint. * * @implSpec * Implementations of this method must return a native segment featuring the requested size, diff --git a/src/java.base/share/classes/java/lang/foreign/FunctionDescriptor.java b/src/java.base/share/classes/java/lang/foreign/FunctionDescriptor.java index 23c64164951..ee42e991480 100644 --- a/src/java.base/share/classes/java/lang/foreign/FunctionDescriptor.java +++ b/src/java.base/share/classes/java/lang/foreign/FunctionDescriptor.java @@ -70,7 +70,7 @@ public sealed interface FunctionDescriptor permits FunctionDescriptorImpl { * Returns a function descriptor with the given argument layouts inserted at the given index, into the argument * layout array of this function descriptor. * @param index the index at which to insert the arguments - * @param addedLayouts the argument layouts to insert at given index. + * @param addedLayouts the argument layouts to insert at the given index. * @return a new function descriptor, with the provided additional argument layouts. * @throws IllegalArgumentException if one of the layouts in {@code addedLayouts} is a padding layout * @throws IllegalArgumentException if {@code index < 0 || index > argumentLayouts().size()} @@ -100,7 +100,7 @@ public sealed interface FunctionDescriptor permits FunctionDescriptorImpl { * * * @apiNote A function descriptor cannot, by construction, contain any padding layouts. As such, it is not - * necessary to specify how padding layout should be mapped to carrier types. + * necessary to specify how padding layouts should be mapped to carrier types. * * @return the method type consisting of the carrier types of the layouts in this function descriptor. */ @@ -121,7 +121,7 @@ public sealed interface FunctionDescriptor permits FunctionDescriptorImpl { } /** - * Creates a function descriptor with the given argument layouts and no return layout. This is useful to model functions + * Creates a function descriptor with the given argument layouts and no return layout. This is useful for modeling functions * that return no values. * @param argLayouts the argument layouts. * @throws IllegalArgumentException if one of the layouts in {@code argLayouts} is a padding layout diff --git a/src/java.base/share/classes/java/lang/foreign/GroupLayout.java b/src/java.base/share/classes/java/lang/foreign/GroupLayout.java index 8182b0da9bf..24bec8f0439 100644 --- a/src/java.base/share/classes/java/lang/foreign/GroupLayout.java +++ b/src/java.base/share/classes/java/lang/foreign/GroupLayout.java @@ -44,7 +44,7 @@ public sealed interface GroupLayout extends MemoryLayout permits StructLayout, U /** * {@return the member layouts of this group layout} * - * @apiNote the order in which member layouts are returned is the same order in which member layouts have + * @apiNote the order in which member layouts are returned in the same order in which member layouts have * been passed to one of the group layout factory methods (see {@link MemoryLayout#structLayout(MemoryLayout...)}, * {@link MemoryLayout#unionLayout(MemoryLayout...)}). */ 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 c1304b8fc89..53fe45d81f3 100644 --- a/src/java.base/share/classes/java/lang/foreign/Linker.java +++ b/src/java.base/share/classes/java/lang/foreign/Linker.java @@ -43,13 +43,13 @@ import java.util.stream.Stream; /** * A linker provides access to foreign functions from Java code, and access to Java code from foreign functions. *

- * Foreign functions typically reside in libraries that can be loaded on-demand. Each library conforms to + * Foreign functions typically reside in libraries that can be loaded on demand. Each library conforms to * a specific ABI (Application Binary Interface). An ABI is a set of calling conventions and data types associated with * the compiler, OS, and processor where the library was built. For example, a C compiler on Linux/x64 usually * builds libraries that conform to the SystemV ABI. *

* A linker has detailed knowledge of the calling conventions and data types used by a specific ABI. - * For any library which conforms to that ABI, the linker can mediate between Java code running + * For any library that conforms to that ABI, the linker can mediate between Java code running * in the JVM and foreign functions in the library. In particular: *