Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions zstd/src/main/java/io/github/dfa1/zstd/NativeCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ private static String errorName(long code) {
/// Guards a zero-copy entry point: the segment handed to zstd must be backed
/// by native (off-heap) memory, since its address is dereferenced in C. Fails
/// fast with a clear message instead of the FFM linker's cryptic error.
static MemorySegment requireNative(MemorySegment seg, String name) {
static void requireNative(MemorySegment seg, String name) {
if (!seg.isNative()) {
throw new IllegalArgumentException(
name + " must be a native (off-heap) MemorySegment; got a heap segment");
}
return seg;
}

/// Rethrows any `Throwable` as if unchecked, laundering the checked
Expand Down
Loading