[jbosstools-issues] [JBoss JIRA] (JBIDE-11068) Wrong error: This parameter type (javax.servlet.http.HttpServletRequest) cannot be annotated with @Context

Ron Ratovsky (JIRA) jira-events at lists.jboss.org
Mon Feb 27 14:13:37 EST 2012


Ron Ratovsky created JBIDE-11068:
------------------------------------

             Summary: Wrong error: This parameter type (javax.servlet.http.HttpServletRequest) cannot be annotated with @Context
                 Key: JBIDE-11068
                 URL: https://issues.jboss.org/browse/JBIDE-11068
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: Webservices
    Affects Versions: 3.3.0.Beta1
         Environment: Win7 64bit
Eclipse 3.7.2 64bit

  JBoss JAX-RS Tools	1.2.2.v20120217-1720-H797-Beta1	org.jboss.tools.ws.jaxrs.feature.feature.group	JBoss by Red Hat
  JBoss Maven Integration	1.3.0.v20120215-1811-H563-Beta1	org.jboss.tools.maven.feature.feature.group	JBoss by Red Hat
  JBoss Maven JAX-RS Configurator	1.3.0.v20120215-1811-H563-Beta1	org.jboss.tools.maven.jaxrs.feature.feature.group	JBoss by Red Hat
  JBoss WebServices Tools	1.2.2.v20120217-1720-H797-Beta1	org.jboss.tools.ws.feature.feature.group	JBoss by Red Hat
            Reporter: Ron Ratovsky
            Assignee: Brian Fitzpatrick


Upon checking in the channel with maxandersen, he found that the following code is related:

* Validates that the method parameters annotated with {@link Context} are of the supported types in the spec:
* {@link UriInfo}, {@link HttpHeaders}, {@link ServletConfig}, {@link ServletContext}, {@link HttpServletRequest},
* {@link Request}, {@link HttpServletResponse} and {@link Response}
ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java

According to the above javadoc, @Context is legal with HttpServletRequest.
However, the plugin produces an error on the following line of code (for example):
public Response get(@Context HttpServletRequest requestContext,	@PathParam(EntitiesRestConsts.PARAM_ID) ObjectId id) {



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list