Skip to main content

[jax-rs-spec issues] [JIRA] Resolved: (JAX_RS_SPEC-305) new standard entity providers do not handle zero length entities

  • From: "Santiago Pericas-Geertsen (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [jax-rs-spec issues] [JIRA] Resolved: (JAX_RS_SPEC-305) new standard entity providers do not handle zero length entities
  • Date: Mon, 5 Nov 2012 16:35:12 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated


     [ 
http://java.net/jira/browse/JAX_RS_SPEC-305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Santiago Pericas-Geertsen resolved JAX_RS_SPEC-305.
---------------------------------------------------

    Resolution: Fixed

Added some text to clarify the case for primitive types. Good catch.

> new standard entity providers do not handle zero length entities
> ----------------------------------------------------------------
>
>                 Key: JAX_RS_SPEC-305
>                 URL: http://java.net/jira/browse/JAX_RS_SPEC-305
>             Project: jax-rs-spec
>          Issue Type: Bug
>          Components: providers
>    Affects Versions: 2.0-pr
>            Reporter: jan.supol
>            Assignee: Santiago Pericas-Geertsen
>             Fix For: 2.0-pfd, 2.0
>
>
> Currently, new entity providers were added: java.lang.Boolean, 
> java.lang.Character, java.lang.Number Only for text/plain. Corresponding
> primitive types supported via boxing/unboxing conversion.
> For the others, the spec. Section 4.2.4 says:
> {quote}
> When reading zero-length request entities, all pre-packaged 
> MessageBodyReader implementations except
> the JAXB-related one MUST create a corresponding Java object that 
> represents zero-length data;
> they MUST NOT return null. The pre-packaged JAXB MessageBodyReader 
> implementation MUST
> throw a WebApplicationException with a client error response (HTTP 400) for 
> zero-length request
> entities. Moreover, all pre-packaged MessageBodyReader implementations 
> SHOULD throw a Web-
> ApplicationException with a client error response (HTTP 400) if any other 
> error is encountered while
> reading a request entity.
> {quote} 
> But for the entities, java objects representing zero length data are not 
> possible to create.

-- 
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

        


[jax-rs-spec issues] [JIRA] Resolved: (JAX_RS_SPEC-305) new standard entity providers do not handle zero length entities

Santiago Pericas-Geertsen (JIRA) 11/05/2012
 
 
Close
loading
Please Confirm
Close