From fdf9809d49bfcda32c346eeb34601e60c12b67b3 Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Fri, 31 Jul 2020 11:42:47 -0400 Subject: [PATCH] AMQ-8016 Fix introspection support not checking Boolean class types Support class should check both primitive and Object based types for conversion from String to boolean or Boolean targets (cherry picked from commit 742a7f42f0168302c0d1d1ea779fdefa09ade4a0) --- .../org/apache/activemq/jms/pool/IntrospectionSupport.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 3e19a7f27a..c0b223d137 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 @@ -20,7 +20,9 @@ import java.lang.reflect.Method; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; + import javax.net.ssl.SSLServerSocket; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -97,7 +99,7 @@ public final class IntrospectionSupport { return to.cast(value); } - if (boolean.class.isAssignableFrom(to) && value instanceof String) { + if ((boolean.class.isAssignableFrom(to) || Boolean.class.isAssignableFrom(to)) && value instanceof String) { return Boolean.valueOf((String)value); }