You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2020/06/23 04:37:57 UTC
[activemq] branch master updated: [AMQ-7121] Set setter accessible
(for JDK 11)
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/master by this push:
new 88525ce [AMQ-7121] Set setter accessible (for JDK 11)
new f4dbb74 Merge pull request #545 from jbonofre/AMQ-7121
88525ce is described below
commit 88525ce650e0843b555b1ef45834435ef719d2f6
Author: jbonofre <jb...@apache.org>
AuthorDate: Mon Jun 22 17:35:49 2020 +0200
[AMQ-7121] Set setter accessible (for JDK 11)
---
.../src/main/java/org/apache/activemq/util/IntrospectionSupport.java | 3 +++
.../main/java/org/apache/activemq/jms/pool/IntrospectionSupport.java | 3 +++
2 files changed, 6 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 94f2158..c43b3a2 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 a86fe64..3e19a7f 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]) {