-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
We have a resource which uses regular expressions within the @path annotation like
@Path("search/{version: (\\d+\\.\\d+\\.\\d+\\.\\d+-\\d+)}{binary: (?:/([^/]*))?}")In the generated RestAction implementation contains a constructor with:
super(httpParameterFactory, defaultDateFormat, HttpMethod.GET, "/search/{version: (\d+\.\d+\.\d+\.\d+-\d+)}{binary: (?:/([^/]*))?}");
addParam(Type.PATH, "version", version);
addParam(Type.PATH, "binary", binary);So during compilation the compiler complains about invalid escape sequences because \d is not well escaped with two backslashes.
I thought that would be related to the ResourceDelegate stuff but now I think the problem is located in gwtp-dispatch-rest. Maybe the only thing to do is to remove the regular expression stuff in the path because it shouldn't be needed for filling in the parameters:
super(httpParameterFactory, defaultDateFormat, HttpMethod.GET, "/search/{version}{binary}");
addParam(Type.PATH, "version", version);
addParam(Type.PATH, "binary", binary);