Details
-
Bug
-
Resolution: Done
-
Minor
-
4.2.0.Beta2
Description
Having the following code:
@Path("/endpoint") public class MyResource { @GET() @Path("/{id1}/{id2}") @Produces(MediaType.TEXT_PLAIN) public String get(@PathParam MyPathParams pathParams) { return ... ; } }
with
public class MyPathParams { @PathParam("id1") private String id1; private String id2; public String getId1() { return id1; } public void setId1(String id1) { this.id1 = id1; } public String getId2() { return id2; } @PathParam("id2") public void setId2(String id2) { this.id2 = id2; } }
Causes the following error message:
The type 'org.javaee7.jaxrs.beanparam.MyPathParams}' is not valid for this parameter. See JAX-RS 2.0 Specification (section 3.2) for more information.
The message ends with an unexpected '}' character.