[Jersey-issues] [JIRA] Created: (JERSEY-1707) When entityReader throws IOException, it is not mappable

  • From: "jan.supol (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [Jersey-issues] [JIRA] Created: (JERSEY-1707) When entityReader throws IOException, it is not mappable
  • Date: Wed, 6 Feb 2013 15:21:53 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated

When entityReader throws IOException, it is not mappable
--------------------------------------------------------

                 Key: JERSEY-1707
                 URL: http://java.net/jira/browse/JERSEY-1707
             Project: jersey
          Issue Type: Bug
          Components: core
    Affects Versions: 2.0-m12
            Reporter: jan.supol
            Priority: Blocker
             Fix For: 2.0-unplanned


{code:java}
@Provider
public class EntityMessageReader implements
                MessageBodyReader<String> {
        @Override
        public boolean isReadable(Class<?> type, Type genericType,
                        Annotation[] annotations, MediaType mediaType) {
               return true;
        }

        @Override
        public String readFrom(Class<String> type,
                        Type genericType, Annotation[] annotations, MediaType 
mediaType,
                        MultivaluedMap<String, String> httpHeaders, 
InputStream entityStream)
                        throws IOException, WebApplicationException {
            throw new IOException("exception");
        }
}
{code}

This IOException is catched in InboundMessageContext#readEntity and wrapped 
to MessageProcessingException, then it is wrapped to MappableException and 
thrown, catched in ServerRuntime#process and passed to 
ServerRuntime#mapException where the MessageProcessingException is extraceted 
from MappedException but the IOException is NOT  extracted from 
MessageProcessingException to be mapped in a provided 
ExceptionMapper<IOException>.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Jersey-issues] [JIRA] Created: (JERSEY-1707) When entityReader throws IOException, it is not mappable

jan.supol (JIRA) 02/06/2013

[Jersey-issues] [JIRA] Updated: (JERSEY-1707) When entityReader throws IOException, it is not mappable

Marek Potociar (JIRA) 02/20/2013

[Jersey-issues] [JIRA] Updated: (JERSEY-1707) When entityReader throws IOException, it is not mappable

Pavel Bucek (JIRA) 02/26/2013

[Jersey-issues] [JIRA] Updated: (JERSEY-1707) When entityReader throws IOException, it is not mappable

Pavel Bucek (JIRA) 02/26/2013
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150226.965aeb8)
 
 
Close
loading
Please Confirm
Close