diff --git a/lucene/core/src/java21/org/apache/lucene/store/PosixNativeAccess.java b/lucene/core/src/java21/org/apache/lucene/store/PosixNativeAccess.java index f34aa1e21641..bd112373eea9 100644 --- a/lucene/core/src/java21/org/apache/lucene/store/PosixNativeAccess.java +++ b/lucene/core/src/java21/org/apache/lucene/store/PosixNativeAccess.java @@ -86,18 +86,15 @@ static Optional getInstance() { private static MethodHandle lookupMadvise() { final Linker linker = Linker.nativeLinker(); final SymbolLookup stdlib = linker.defaultLookup(); - final MethodHandle mh = - findFunction( - linker, - stdlib, - "posix_madvise", - FunctionDescriptor.of( - ValueLayout.JAVA_INT, - ValueLayout.ADDRESS, - ValueLayout.JAVA_LONG, - ValueLayout.JAVA_INT)); - LOG.info("posix_madvise() available on this platform"); - return mh; + return findFunction( + linker, + stdlib, + "posix_madvise", + FunctionDescriptor.of( + ValueLayout.JAVA_INT, + ValueLayout.ADDRESS, + ValueLayout.JAVA_LONG, + ValueLayout.JAVA_INT)); } private static MethodHandle findFunction(