users@jersey.java.net

[Jersey] Unexpected behaviour with multiple parameter annotations

From: Luis <delagarza_at_gmail.com>
Date: Sat, 11 Jun 2011 13:43:29 -0700 (PDT)

A method such as the following:

public String echo(@QueryParam("id") @NonJerseyAnnotation final String id) {
        return "obtained id: " + id;
}

will never pull id from the query string, because the id parameter got
assigned UNKNOWN as Source (by the IntrospectionModeller). Changing the
order of the annotations makes the method work as expected.

I debugged the IntrospectionModeller to see what was going on. It seems that
the last annotation present on a parameter is the one that actually gets
considered.

Is it an issue with Jersey (http://java.net/jira/browse/JERSEY-128, but
seems fixed)? Or is there something that I'm doing wrong?



-----
--
Luis
--
View this message in context: http://jersey.576304.n2.nabble.com/Unexpected-behaviour-with-multiple-parameter-annotations-tp6465963p6465963.html
Sent from the Jersey mailing list archive at Nabble.com.