You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2013/07/13 22:14:07 UTC

[jira] [Closed] (WINK-36) WebApplicationException thrown in annotated parameter constructor not processed correctly

     [ https://issues.apache.org/jira/browse/WINK-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek closed WINK-36.
--------------------------------

    
> WebApplicationException thrown in annotated parameter constructor not processed correctly
> -----------------------------------------------------------------------------------------
>
>                 Key: WINK-36
>                 URL: https://issues.apache.org/jira/browse/WINK-36
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.1
>            Reporter: Jesse Ramos
>            Assignee: Michael Elman
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: WINK-36-patch.txt, WINK-36-unittest.txt
>
>
> When a method parameter is annotated, for example with @HeaderParam, if the constructor of the field throws a WebApplicationException, the exception should be processed directly according to section 3.2 of the spec. Currently, it ends up being wrapped within another WebApplicationException and the status code and entity are lost.
> Java throws an InvocationException which is caught in ValueConverter and transformed into a ConversionException.  Within ServerInjectableFactory, the ConversionException is then transformed into a WebApplicationException with status code 400, which is what should happen for other types of Exceptions.
> The cause of the InvocationException needs to be examined.  If the cause is a WebApplicationException, it needs to be rethrown instead of being transformed into a ConversionException.
> Working on converting some integration tests that will expose the problem which I'll drop in another bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira