This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch activemq-5.18.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-5.18.x by this push:
new 9b81a7601 AMQ-9473: Fix IntrospectionSupport to deal with SSLSocket
properties
9b81a7601 is described below
commit 9b81a7601014be8e90c889a3300fecf698d857fb
Author: JB Onofré <[email protected]>
AuthorDate: Thu Apr 11 09:09:10 2024 +0200
AMQ-9473: Fix IntrospectionSupport to deal with SSLSocket properties
(cherry picked from commit 550cb9b2be32e5a6454e7bee5e31632498626a9c)
---
.../src/main/java/org/apache/activemq/util/IntrospectionSupport.java | 3 +++
.../main/java/org/apache/activemq/jms/pool/IntrospectionSupport.java | 4 ++++
2 files changed, 7 insertions(+)
diff --git
a/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
b/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
index c43b3a2bd..d69fd5b6b 100644
---
a/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
+++
b/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
@@ -169,6 +169,9 @@ public final class IntrospectionSupport {
if (target instanceof SSLServerSocket) {
// overcome illegal access issues with internal implementation
class
clazz = SSLServerSocket.class;
+ } else if (target instanceof javax.net.ssl.SSLSocket) {
+ // overcome illegal access issues with internal implementation
class
+ clazz = javax.net.ssl.SSLSocket.class;
}
Method setter = findSetterMethod(clazz, name);
if (setter == null) {
diff --git
a/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/IntrospectionSupport.java
b/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/IntrospectionSupport.java
index c0b223d13..ac45f7ffd 100644
---
a/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/IntrospectionSupport.java
+++
b/activemq-jms-pool/src/main/java/org/apache/activemq/jms/pool/IntrospectionSupport.java
@@ -22,6 +22,7 @@ import java.util.Map;
import java.util.Map.Entry;
import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLSocket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,6 +61,9 @@ public final class IntrospectionSupport {
if (target instanceof SSLServerSocket) {
// overcome illegal access issues with internal implementation
class
clazz = SSLServerSocket.class;
+ } else if (target instanceof javax.net.ssl.SSLSocket) {
+ // overcome illegal access issues with internal implementation
class
+ clazz = javax.net.ssl.SSLSocket.class;
}
Method setter = findSetterMethod(clazz, name);
if (setter == null) {