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/16 00:37:14 UTC
[jira] Updated: (WINK-103) Method invoked but no HttpMethod
[ https://issues.apache.org/jira/browse/WINK-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Ramos updated WINK-103:
-----------------------------
Attachment: WINK-103.patch
After talking with Bryant, I went ahead and took a look at implementing his suggested fix. I don't see any issues changing MethodMetadata.getHttpMethod() to return a String rather than a Set, since, as Bryant pointed out, it is not possible to have more than one HttpMethod annotation on a resource method.
Attached is a patch with the changes.
> Method invoked but no HttpMethod
> --------------------------------
>
> Key: WINK-103
> URL: https://issues.apache.org/jira/browse/WINK-103
> Project: Wink
> Issue Type: Bug
> Components: Server
> Affects Versions: 0.1
> Reporter: Bryant Luk
> Fix For: 0.1
>
> Attachments: WINK-103.patch
>
>
> If a non-HttpMethod annotated annotation is not present but a JAX-RS regular annotation is present, then the method will get invoked for any matching method. wink-server/EncodedTest will fail one test because of this but ran into it during one of the integration tests.
> {code}
> @Path("/abcd")
> public class Resource {
> @Produces("text/plain")
> public Response invokeMeAnytime() {
> }
> }
> {code}
> Invoke a GET to /abcd with Accept header of text/plain.
> The problem is with a) Method metadata records are added to the root resource even if there isn't a HttpMethod (which is the easy if check fix) and b) the filtering HTTP method algorithm assumes that if you don't have a HttpMethod, you must be a subresource locator I think.
> The real fix to me is to get rid of the Set returned of HttpMethod since it is not possible with JAX-RS to have a method be annotated with greater than 1 @HttpMethod annotated annotations.
> I consider this a must fix for 0.1 so I'll go ahead and mark it that way.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.