This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 9fce4f4694a [improve][client] Swallow Conscrypt ClassNotFoundException
(#20371)
9fce4f4694a is described below
commit 9fce4f4694a2faee0e5dd80115b9ee083daff73f
Author: Nicolò Boschi <[email protected]>
AuthorDate: Wed May 24 03:36:10 2023 +0200
[improve][client] Swallow Conscrypt ClassNotFoundException (#20371)
(cherry picked from commit 2e6928a02037087e3809fe35c55fd738bb229ee7)
---
.../src/main/java/org/apache/pulsar/common/util/SecurityUtility.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
b/pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
index 12ab9ae0b0b..f0023ce5a42 100644
---
a/pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
+++
b/pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
@@ -124,7 +124,9 @@ public class SecurityUtility {
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 {