[ https://issues.apache.org/jira/browse/JOHNZON-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16938597#comment-16938597 ]
Markus Karg commented on JOHNZON-281: ------------------------------------- I will provide a PR to fix this spec incompliance. > 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 > Priority: Major > > 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)