[ 
https://issues.apache.org/jira/browse/CXF-7059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15494226#comment-15494226
 ] 

ASF GitHub Bot commented on CXF-7059:
-------------------------------------

GitHub user andymc12 opened a pull request:

    https://github.com/apache/cxf/pull/171

    CXF-7059 Update getBooleanValue to read String values

    https://issues.apache.org/jira/browse/CXF-7059
    
    Simple change to make getBooleanValue consistent with getIntValue, etc.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andymc12/cxf patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/171.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #171
    
----

----


> 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
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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)

Reply via email to