What changed, and why it matters
This commit is a routine maintenance patch. It adds a JVM command-line flag to allow a library (JNA, used for native code access) to avoid a deprecation warning, and updates one Java call from an older constructor style to a newer static builder style. There is no security-relevant change visible in the diff.
No security action required. Review as normal code maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds --enable-native-access=com.sun.jna to both applicationDefaultJvmArgs and jlink launcher jvmArgs in build.gradle, and replaces new BasicThreadFactory.Builder() with BasicThreadFactory.builder() in DbPersistence.java. These are API/deprecation cleanups. No privilege boundary, input validation, cryptographic, or data-handling change is present.
Changed components
build.gradle JVM launch argumentssrc/main/java/com/sparrowwallet/sparrow/io/db/DbPersistence.javaInspect captured patch +3 / −1
diff --git a/build.gradle b/build.gradle
index b9e2a2c..45514ba 100644
--- a/build.gradle
+++ b/build.gradle
@@ -143,6 +143,7 @@ application {
applicationDefaultJvmArgs = ["-XX:+HeapDumpOnOutOfMemoryError",
"--enable-native-access=com.sparrowwallet.drongo",
+ "--enable-native-access=com.sun.jna",
"--enable-native-access=javafx.graphics",
"--enable-native-access=com.fazecast.jSerialComm",
"--enable-native-access=org.usb4java",
@@ -196,6 +197,7 @@ jlink {
launcher {
name = 'sparrow'
jvmArgs = ["--enable-native-access=com.sparrowwallet.drongo",
+ "--enable-native-access=com.sun.jna",
"--enable-native-access=javafx.graphics",
"--enable-native-access=com.sparrowwallet.merged.module",
"--enable-native-access=com.fazecast.jSerialComm",
diff --git a/src/main/java/com/sparrowwallet/sparrow/io/db/DbPersistence.java b/src/main/java/com/sparrowwallet/sparrow/io/db/DbPersistence.java
index a4c216e..5802809 100644
--- a/src/main/java/com/sparrowwallet/sparrow/io/db/DbPersistence.java
+++ b/src/main/java/com/sparrowwallet/sparrow/io/db/DbPersistence.java
@@ -171,7 +171,7 @@ public class DbPersistence implements Persistence {
private synchronized void createUpdateExecutor(Wallet masterWallet) {
if(updateExecutor == null) {
- BasicThreadFactory factory = new BasicThreadFactory.Builder().namingPattern(masterWallet.getFullName() + "-dbupdater").daemon(true).priority(Thread.NORM_PRIORITY).build();
+ BasicThreadFactory factory = BasicThreadFactory.builder().namingPattern(masterWallet.getFullName() + "-dbupdater").daemon(true).priority(Thread.NORM_PRIORITY).build();
updateExecutor = Executors.newSingleThreadExecutor(factory);
}
}
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.