Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
1.2.1.GA
-
None
-
None
Description
I have two rest methods, something like this:
@GET
@Path("/something")
@Produces(MediaType.APPLICATION_XML)
public abstract List<Something> getSomethingByA(@QueryParam("a") String a);
@GET
@Path("/something")
@Produces(MediaType.APPLICATION_XML)
public abstract List<Something> getSomethingByB(@QueryParam("b") String b);
It seems like resteasy is invoking the methods randomly, both in our jUnit and real tests. e.g. A call to /something?a=xyz may end up in getSomethingByB and not getSomethingByA as expected.
Our workaround is to expose only whone method:
@GET
@Path("/something")
@Produces(MediaType.APPLICATION_XML)
public abstract Option<Agreement> getSomething(@QueryParam("a") String a, @QueryParam("b") String b);
But then one has to do null checks in the code.