Markus Karg created JOHNZON-281:
-----------------------------------

             Summary: JAX-RS Provider MUST throw NoContentException for empty 
input stream
                 Key: JOHNZON-281
                 URL: https://issues.apache.org/jira/browse/JOHNZON-281
             Project: Johnzon
          Issue Type: Bug
          Components: JSON-B
    Affects Versions: 1.2.0, 1.2.1
            Reporter: Markus Karg


The Johnzon JAX-RS Provider throws the _wrong_ exception type in case of 
reading empty input streams. JAX-RS 2.1 requires to throw *NoContentException*, 
but Johnzon throws *JsonbException*.

See JavaDocs of JAX-RS 2.1 MessageBodyReader:
{quote}In case the entity input stream is empty, the reader is expected to 
either return a Java representation of a zero-length entity or throw a 
javax.ws.rs.core.NoContentException in case no zero-length entity 
representation is defined for the supported Java type.
{quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to