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.
This commit is contained in:
Sean Gilligan 2021-09-20 12:36:19 -07:00 committed by Andreas Schildbach
parent 93f0bb7a54
commit 7178cd3f4f

View file

@ -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;
}