spark404 opened a new pull request #545: If there is no inMessage use the 
inFaultMessage
URL: https://github.com/apache/cxf/pull/545
 
 
   I observed that when reading an entity from a response of a failed rest call 
the CXF throws a NullPointer exception.
   
   I tracked this down to specific case where a JAXRS ReaderInterceptor is 
present on the chain and the response fails. When parsing the response this 
condition triggers a different path in JAXRSUtils.readFromMessageBodyReader 
which eventually results in a call to 
ProviderFactory.createMessageBodyReaderInterceptor which will throw a 
NullPointerException when there is no inMessage.
   
   This fix tries to load  an inFaultMessage if there is no inMessage available 
which prevents the NPE and allows the code to execute successfully.
   
   To reproduce create a JAX-RS Proxy client with a ReaderInterceptor. Then 
trigger a request that returns a 403 status code and try to 'readEntity' on the 
resulting ForbiddenException response.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to