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

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

Jesse Ramos reopened WINK-36:
-----------------------------


There is one more similar code path where the fix is needed. Will attach a patch with the fix.

> 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-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.
-
You can reply to this email to add a comment to the issue online.