mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复NoSuchMethodError未捕获问题
This commit is contained in:
@@ -8,6 +8,9 @@ import java.security.Provider;
|
||||
* @author looly
|
||||
*/
|
||||
public enum GlobalBouncyCastleProvider {
|
||||
/**
|
||||
* 单例
|
||||
*/
|
||||
INSTANCE;
|
||||
|
||||
private Provider provider;
|
||||
@@ -16,7 +19,7 @@ public enum GlobalBouncyCastleProvider {
|
||||
GlobalBouncyCastleProvider() {
|
||||
try {
|
||||
this.provider = ProviderFactory.createBouncyCastleProvider();
|
||||
} catch (NoClassDefFoundError e) {
|
||||
} catch (NoClassDefFoundError | NoSuchMethodError e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user