Skip to main content

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

  • From: "Santiago Pericas-Geertsen (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers
  • Date: Thu, 13 Dec 2012 19:35:01 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated


    [ 
http://java.net/jira/browse/JAX_RS_SPEC-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=351913#action_351913
 ] 

Santiago Pericas-Geertsen commented on JAX_RS_SPEC-318:
-------------------------------------------------------

Could you elaborate on the use case in which you need (i) a response with a 
non-null entity and (ii) a cause? And why can't you just use a response with 
a null entity for the mapper to kick in?

> Spec text to do with mapping WebApplicationExceptions makes it impossible 
> to get custom cause exceptions visible to mappers
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JAX_RS_SPEC-318
>                 URL: http://java.net/jira/browse/JAX_RS_SPEC-318
>             Project: jax-rs-spec
>          Issue Type: Bug
>            Reporter: beryozkin_sergey
>            Assignee: Santiago Pericas-Geertsen
>             Fix For: 2.0
>
>
> WAE and subclasses have constructors accepting Response and cause Throwable.
> The spec text makes it impossible for the application code to throw WAE 
> initialized with Response containing entity and the cause exception and 
> make this cause exception visible to custom mappers expecting to react 
> somehow to the cause exceptions.
> Proposal:
> 1. Keep the current optimization in place but update the spec to say that 
> "if WAE Response entity is null or WAE cause exception is not null - use 
> the mapper, otherwise - use WAE Response entity directly"
> IMHO, much better solution is to drop this optimization - the typical 
> mapper will never blindly replace WAE initialized Response - so keeping 
> this optimization in place would really be about protecting the 
> expectations of the providers which have not been written well. 
> If that still not an option - then 1 has to be done IMHO, the mappers must 
> be able to see WAE cause exceptions if it is what the user wished by using 
> the relevant constructors from the code  

-- 
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] Created: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

beryozkin_sergey (JIRA) 12/13/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

Santiago Pericas-Geertsen (JIRA) 12/13/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

beryozkin_sergey (JIRA) 12/13/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

Santiago Pericas-Geertsen (JIRA) 12/14/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

beryozkin_sergey (JIRA) 12/14/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

Santiago Pericas-Geertsen (JIRA) 12/17/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

beryozkin_sergey (JIRA) 12/17/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

Santiago Pericas-Geertsen (JIRA) 12/18/2012

[jax-rs-spec issues] [JIRA] Commented: (JAX_RS_SPEC-318) Spec text to do with mapping WebApplicationExceptions makes it impossible to get custom cause exceptions visible to mappers

beryozkin_sergey (JIRA) 12/18/2012
 
 
Close
loading
Please Confirm
Close