Fixed NumberFormatException in the rest layer by only setting batch_size if it has been specified.
This commit is contained in:
parent
0dc5a89bc5
commit
6c06aacb57
|
@ -41,7 +41,9 @@ public class RestFollowExistingIndexAction extends BaseRestHandler {
|
|||
Request request = new Request();
|
||||
request.setLeaderIndex(restRequest.param("leader_index"));
|
||||
request.setFollowIndex(restRequest.param("follow_index"));
|
||||
request.setBatchSize(Long.valueOf(restRequest.param("batch_size")));
|
||||
if (restRequest.hasParam("batch_size")) {
|
||||
request.setBatchSize(Long.valueOf(restRequest.param("batch_size")));
|
||||
}
|
||||
return channel -> client.execute(INSTANCE, request, new RestBuilderListener<Response>(channel) {
|
||||
@Override
|
||||
public RestResponse buildResponse(Response response, XContentBuilder builder) throws Exception {
|
||||
|
|
Loading…
Reference in New Issue