When using @Path expression like:
@Path("@
{segment}")
The path matching will not work as expected since @ is encoded in the generated regex (which is correct) but when computing offsets to advance in path segment matching the decoded form is used.
This can be easily fixed by replacing this line:
String currentUri = request.getUri().getMatchedURIs().get(0);
with
String currentUri = request.getUri().getMatchedURIs(false).get(0);
in ResourceMethodRegistry.getResourceInvoker(HttpRequest request, HttpResponse response)
You can reproduce it by using a path like /prefix/@test/suffix which will resolve /prefix/@test on a resources and /prefix/@test/suffix on a sub resource.
(Resolving the resource will work but resolving the sub resource will fail)