camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Ten-Hove (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-9230) CXFRS NPE when response code not in Response.Status
Date Fri, 16 Oct 2015 21:57:05 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ron Ten-Hove updated CAMEL-9230:
--------------------------------
    Attachment:     (was: CAMEL-9230-reproduction.patch)

> CXFRS NPE when response code not in Response.Status
> ---------------------------------------------------
>
>                 Key: CAMEL-9230
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9230
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxfrs
>    Affects Versions: 2.15.3
>            Reporter: Ron Ten-Hove
>         Attachments: CAMEL-9230-reproduction.patch
>
>
> When used as a producer, the CXFRS component's {{org.apache.camel.component.cxf.jaxrs.CxfRsProducer#populateCxfRsProducerException}}
method converts the received HTTP response status code to text:
> {{String statusText = Response.Status.fromStatusCode(responseCode).toString();}}
> If the JAX-RS-supplied {{fromStatusCode}} method does not recognize the status code provided,
it returns {{null}}, causing the CxfRsProducer to thrown an NPE. 
> Note that {{Response.Status}} does not know all response codes. I ran afoul of this when
a REST service returned a 422 for a validation error.
> I will attach a unit test that illustrates this problem, as a patch to the current unit
tests for the class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message