Merge pull request #545 from jbonofre/AMQ-7121

[AMQ-7121] Set setter accessible (for JDK 11)
This commit is contained in:
Jean-Baptiste Onofré 2020-06-23 06:37:48 +02:00 committed by GitHub
commit f4dbb74048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -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]) {

View File

@ -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]) {