Skip to content

Commit

Permalink
java 8 and 11
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciferYang committed Oct 22, 2023
1 parent 65f5e66 commit 69adb01
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,13 @@ public static CryptoRandom getCryptoRandom(final Properties props)
}
} catch (final NoClassDefFoundError noClassDefFoundError) {
Throwable initializerError = noClassDefFoundError.getCause();
String message = noClassDefFoundError.getMessage();
if (initializerError instanceof ExceptionInInitializerError) {
lastException = new IllegalStateException(initializerError.getMessage());
lastException = new IllegalStateException(initializerError.getMessage());
errorMessage.append("CryptoRandom: [" + className + "] initialization failed with " + initializerError.getMessage());
} else if (initializerError == null && message != null && message.startsWith("Could not initialize class")) {
lastException = new IllegalStateException(message);
errorMessage.append("CryptoRandom: [" + className + "] initialization failed with " + message);
} else {
throw noClassDefFoundError;
}
Expand Down

0 comments on commit 69adb01

Please sign in to comment.