Correct order of routing and parent params for Get

The order in which routing and parent parameters are set is important.  The
routing parameter must be set first or it will overwrite the parent routing
value.
This commit is contained in:
Matt Weber 2013-02-28 14:53:07 -08:00 committed by Shay Banon
parent 2eea99255d
commit dfd92265b7
1 changed files with 1 additions and 1 deletions

View File

@ -53,8 +53,8 @@ public class RestGetAction extends BaseRestHandler {
getRequest.listenerThreaded(false); getRequest.listenerThreaded(false);
getRequest.operationThreaded(true); getRequest.operationThreaded(true);
getRequest.refresh(request.paramAsBoolean("refresh", getRequest.refresh())); getRequest.refresh(request.paramAsBoolean("refresh", getRequest.refresh()));
getRequest.routing(request.param("routing")); // order is important, set it after routing, so it will set the routing
getRequest.parent(request.param("parent")); getRequest.parent(request.param("parent"));
getRequest.routing(request.param("routing"));
getRequest.preference(request.param("preference")); getRequest.preference(request.param("preference"));
getRequest.realtime(request.paramAsBooleanOptional("realtime", null)); getRequest.realtime(request.paramAsBooleanOptional("realtime", null));