}
protected Object createResource(HttpRequest request, HttpResponse response, Object locator)
{
ResteasyUriInfo uriInfo = request.getUri();
Object[] args = new Object[0];
RuntimeException lastException = (RuntimeException)request.getAttribute(ResourceMethodRegistry.REGISTRY_MATCHING_EXCEPTION);
try
{
args = methodInjector.injectArguments(request, response);
}
catch (NotFoundException failure)
{
if (lastException != null) throw lastException;
throw failure;
}
try
{
uriInfo.pushCurrentResource(locator);
Object subResource = method.getMethod().invoke(locator, args);
return subResource;
}
catch (IllegalAccessException e)