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
(cherry picked from commit 742a7f42f0
)
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…
Reference in New Issue