mirror of https://github.com/apache/activemq.git
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
This commit is contained in:
parent
aed91a7474
commit
742a7f42f0
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue