[jbosstools-issues] [JBoss JIRA] (JBIDE-17801) JAX-RS validation: Bogus warning for parameter whose type is an enumeration

Clovis Seragiotto (JIRA) issues at jboss.org
Fri Jul 4 02:07:25 EDT 2014


     [ https://issues.jboss.org/browse/JBIDE-17801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clovis Seragiotto updated JBIDE-17801:
--------------------------------------

           Description: 
The JAX-RS validation wrongly complains about the type of the parameter when it is an enumeration defined in the same class of the resource.

"The type 'Resources.InstanceType' is not valid for this parameter. See JAX-RS 2.0 Specification (section 3.2) for more information."	

(the error message just telling that something is invalid doesn't help too much either when you are trying to understand how the validation is reasoning)



  was:
The JAX-RS validation wrongly complains about the type of the parameter, when it is an enumeration defined in the same class of the resource.

"The type 'Resources.InstanceType' is not valid for this parameter. See JAX-RS 2.0 Specification (section 3.2) for more information."	

(the error message just telling that something is invalid doesn't help too much either when you are trying to understand how the validation is reasoning)



    Steps to Reproduce: 
The problem can be reproduced with the code below:

{code}
@javax.ws.rs.Path("hello")
public class HelloWorld {
    @javax.ws.rs.GET
    public String getMessage(@javax.ws.rs.QueryParam("type") MessageType type) {
        return "foo";
    }
	
    public enum MessageType { A, B }
}
{code}

  was:
The problem can be reproduced with the code below:

@javax.ws.rs.Path("hello")
public class HelloWorld {
    @javax.ws.rs.GET
    public String getMessage(@javax.ws.rs.QueryParam("type") MessageType type) {
        return "foo";
    }
	
    public enum MessageType { A, B }
}



> JAX-RS validation: Bogus warning for parameter whose type is an enumeration
> ---------------------------------------------------------------------------
>
>                 Key: JBIDE-17801
>                 URL: https://issues.jboss.org/browse/JBIDE-17801
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: webservices
>    Affects Versions: 4.2.0.Beta2
>            Reporter: Clovis Seragiotto
>
> The JAX-RS validation wrongly complains about the type of the parameter when it is an enumeration defined in the same class of the resource.
> "The type 'Resources.InstanceType' is not valid for this parameter. See JAX-RS 2.0 Specification (section 3.2) for more information."	
> (the error message just telling that something is invalid doesn't help too much either when you are trying to understand how the validation is reasoning)



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jbosstools-issues mailing list