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 94f21585a5..c43b3a2bdb 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 @@ -175,6 +175,9 @@ public final class IntrospectionSupport { return false; } + // JDK 11: class or setter might not be publicly accessible + setter.setAccessible(true); + // If the type is null or it matches the needed type, just use the // value directly if (value == null || value.getClass() == setter.getParameterTypes()[0]) { 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 a86fe643ce..3e19a7f27a 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 @@ -64,6 +64,9 @@ public final class IntrospectionSupport { return false; } + // JDK 11: class or setter might not be publicly accessible + setter.setAccessible(true); + // If the type is null or it matches the needed type, just use the // value directly if (value == null || value.getClass() == setter.getParameterTypes()[0]) {