Secp256k1Context: replace AccessControlException
AccessControlException is deprecated for removal in JDK 17.
its parent classes are:
`AccessControlException` <- `SecurityException` <- `RuntimeException`
It can be replaced with its parent `SecurityException` which is not deprecated and will behave almost identically in this one place where it is used.
@@ -19,7 +19,7 @@ package org.bitcoin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.security.AccessControlException;
+import java.lang.SecurityException;
/**
* This class holds the context reference used in native methods to handle ECDSA operations.
@@ -37,7 +37,7 @@ public class Secp256k1Context {
try {
System.loadLibrary("secp256k1");
contextRef = secp256k1_init_context();
- } catch (UnsatisfiedLinkError | AccessControlException e) {
+ } catch (UnsatisfiedLinkError | SecurityException e) {
log.debug(e.toString());
isEnabled = false;
}
