[jbosstools-issues] [JBoss JIRA] (JBIDE-17730) JAX-RS @PathParam Field is not validated against @Path annotation value
Xavier Coulon (JIRA)
issues at jboss.org
Mon Jun 30 19:18:23 EDT 2014
[ https://issues.jboss.org/browse/JBIDE-17730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xavier Coulon updated JBIDE-17730:
----------------------------------
Description:
Take the following code:
{code}
@Path("/")
public class CarResource {
@PathParam("id")
private Integer id;
@GET
@Path("{id}")
public Object getCar() {
return null;
}
}
{code}
replace {{@PathParam("id")}} with {{@PathParam("i")}}, there is no problem reported, while there should be.
was:
Take the following code:
{code}
@Path("/")
public class CarResource {
@PathParam("id")
private Integer id;
@GET
@Path("{id}")
public Object getCar() {
return null;
}
}
{code}
replace {{@PathParam("id")}} with {{@PathParam("i")}}, there is no problem reported, while there should be.
Note: replacing {{@Path("{id}")}} with {{@Path("{i}")}} instead results in a proble reported by the JAX-RS validator.
> JAX-RS @PathParam Field is not validated against @Path annotation value
> -----------------------------------------------------------------------
>
> Key: JBIDE-17730
> URL: https://issues.jboss.org/browse/JBIDE-17730
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: webservices
> Affects Versions: 4.2.0.Beta2
> Reporter: Xavier Coulon
> Assignee: Xavier Coulon
> Fix For: 4.2.0.Beta3
>
>
> Take the following code:
> {code}
> @Path("/")
> public class CarResource {
>
> @PathParam("id")
> private Integer id;
>
> @GET
> @Path("{id}")
> public Object getCar() {
> return null;
> }
> }
> {code}
> replace {{@PathParam("id")}} with {{@PathParam("i")}}, there is no problem reported, while there should be.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jbosstools-issues
mailing list