java: disable loadLibrary warning running tests
What changed, and why it matters
This is a small build/test configuration change for Java tests. It adds a Java command-line option that suppresses a warning when native (non-Java) libraries are loaded during testing. The change only affects how tests are run and requires Java 20 or newer. There is no indication it fixes or introduces a security vulnerability.
No security action required. Reviewers may verify that CI Java versions are updated to 20+ as noted by the commit message.
Security signals we found
No security-relevant code changes
No cryptographic or memory-safety changes
No vulnerability fixes or mitigations described
Build/test tooling change only
Evidence from the diff
The commit modifies src/Makefile.am to add –enable-native-access=ALL-UNNAMED to the JAVA_TEST invocation. This JVM option, introduced in Java 20, disables warnings about native library access from unnamed modules. It is a test-harness convenience change to silence loadLibrary warnings and does not alter library code, APIs, or cryptographic behavior.
Changed components
src/Makefile.am Java test targetInspect captured patch +2 / −1
diff --git a/src/Makefile.am b/src/Makefile.am
index c73d3e4..82674db 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -127,7 +127,8 @@ endif # RUN_JAVA_TESTS
$(JAVA_CLASSES) &: $(JAVA_CLASSES:.class=.java)
$(AM_V_at)$(JAVAC) -implicit:none -source $(JAVAC_TARGET) -target $(JAVAC_TARGET) -sourcepath $(sjs) $^
-JAVA_TEST = @LDPATH_VAR@=.libs $(JAVA) -Djava.library.path=.libs -classpath $(sjs) com.blockstream.test.
+JAVA_TEST_OPT = --enable-native-access=ALL-UNNAMED
+JAVA_TEST = @LDPATH_VAR@=.libs $(JAVA) $(JAVA_TEST_OPT) -Djava.library.path=.libs -classpath $(sjs) com.blockstream.test.
endif # HAVE_JAVAC
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.