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

[jira] Resolved: (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 ]

Michael Elman resolved WINK-36.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.1
         Assignee:     (was: Michael Elman)

Should be fixed after revision 791217.
I have added the unit test to svn with some minor changes, like adding imports and declaring throws on tests methods.

> 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
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 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.
-
You can reply to this email to add a comment to the issue online.