mirror of
https://github.com/apache/activemq.git
synced 2025-02-10 03:56:21 +00:00
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)
This commit is contained in:
parent
2fa7f09fb9
commit
fdf9809d49
@ -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…
x
Reference in New Issue
Block a user