You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andy McCright (JIRA)" <ji...@apache.org> on 2016/09/15 18:35:20 UTC
[jira] [Created] (CXF-7059) ClientImpl.getBooleanValue() will
return null for String values
Andy McCright created CXF-7059:
----------------------------------
Summary: ClientImpl.getBooleanValue() will return null for String values
Key: CXF-7059
URL: https://issues.apache.org/jira/browse/CXF-7059
Project: CXF
Issue Type: Bug
Components: JAX-RS
Affects Versions: 3.1.7
Reporter: Andy McCright
Priority: Minor
The getBooleanValue(Object o) method looks like this:
private static Boolean getBooleanValue(Object o) {
return o instanceof Boolean ? (Boolean)o : o instanceof Boolean ? Boolean.valueOf(o.toString()) : null;
}
If o is not an instance of Boolean, it checks to see if it is a Boolean again. Instead, it should get to see if it is an instance of String like the getIntValue method:
private static Integer getIntValue(Object o) {
return o instanceof Integer ? (Integer)o : o instanceof String ? Integer.valueOf(o.toString()) : null;
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)