Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][client] Swallow Conscrypt ClassNotFoundException #20371

Merged
merged 3 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ private static Provider loadConscryptProvider() {
conscryptClazz = Class.forName("org.conscrypt.Conscrypt");
conscryptClazz.getMethod("checkAvailability").invoke(null);
} catch (Throwable e) {
if (e.getCause() instanceof UnsatisfiedLinkError) {
if (e instanceof ClassNotFoundException) {
log.warn("Conscrypt isn't available in the classpath. Using JDK default security provider.");
} else if (e.getCause() instanceof UnsatisfiedLinkError) {
log.warn("Conscrypt isn't available for {} {}. Using JDK default security provider.",
System.getProperty("os.name"), System.getProperty("os.arch"));
} else {
Expand Down