Merge pull request #15812 from nik9000/varargs
Standardize some methods on varargs
This commit is contained in:
commit
1325c1442b
|
@ -35,7 +35,7 @@ public interface AliasesRequest extends IndicesRequest.Replaceable {
|
||||||
/**
|
/**
|
||||||
* Sets the array of aliases that the action relates to
|
* Sets the array of aliases that the action relates to
|
||||||
*/
|
*/
|
||||||
AliasesRequest aliases(String[] aliases);
|
AliasesRequest aliases(String... aliases);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if wildcards expressions among aliases should be resolved, false otherwise
|
* Returns true if wildcards expressions among aliases should be resolved, false otherwise
|
||||||
|
|
|
@ -41,9 +41,9 @@ public interface IndicesRequest {
|
||||||
IndicesOptions indicesOptions();
|
IndicesOptions indicesOptions();
|
||||||
|
|
||||||
static interface Replaceable extends IndicesRequest {
|
static interface Replaceable extends IndicesRequest {
|
||||||
/*
|
/**
|
||||||
* Sets the array of indices that the action relates to
|
* Sets the indices that the action relates to.
|
||||||
*/
|
*/
|
||||||
IndicesRequest indices(String[] indices);
|
IndicesRequest indices(String... indices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class ClusterHealthRequest extends MasterNodeReadRequest<ClusterHealthReq
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClusterHealthRequest indices(String[] indices) {
|
public ClusterHealthRequest indices(String... indices) {
|
||||||
this.indices = indices;
|
this.indices = indices;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class IndicesExistsRequest extends MasterNodeReadRequest<IndicesExistsReq
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IndicesExistsRequest indices(String[] indices) {
|
public IndicesExistsRequest indices(String... indices) {
|
||||||
this.indices = indices;
|
this.indices = indices;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class TypesExistsRequest extends MasterNodeReadRequest<TypesExistsRequest
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TypesExistsRequest indices(String[] indices) {
|
public TypesExistsRequest indices(String... indices) {
|
||||||
this.indices = indices;
|
this.indices = indices;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
package org.elasticsearch.action.admin.indices.mapping.put;
|
package org.elasticsearch.action.admin.indices.mapping.put;
|
||||||
|
|
||||||
import com.carrotsearch.hppc.ObjectHashSet;
|
import com.carrotsearch.hppc.ObjectHashSet;
|
||||||
|
|
||||||
import org.elasticsearch.ElasticsearchGenerationException;
|
import org.elasticsearch.ElasticsearchGenerationException;
|
||||||
import org.elasticsearch.action.ActionRequestValidationException;
|
import org.elasticsearch.action.ActionRequestValidationException;
|
||||||
import org.elasticsearch.action.IndicesRequest;
|
import org.elasticsearch.action.IndicesRequest;
|
||||||
|
@ -96,7 +97,7 @@ public class PutMappingRequest extends AcknowledgedRequest<PutMappingRequest> im
|
||||||
* Sets the indices this put mapping operation will execute on.
|
* Sets the indices this put mapping operation will execute on.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PutMappingRequest indices(String[] indices) {
|
public PutMappingRequest indices(String... indices) {
|
||||||
this.indices = indices;
|
this.indices = indices;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class PutWarmerRequest extends AcknowledgedRequest<PutWarmerRequest> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IndicesRequest indices(String[] indices) {
|
public IndicesRequest indices(String... indices) {
|
||||||
if (searchRequest == null) {
|
if (searchRequest == null) {
|
||||||
throw new IllegalStateException("unable to set indices, search request is null");
|
throw new IllegalStateException("unable to set indices, search request is null");
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class DeleteByQueryRequest extends ActionRequest<DeleteByQueryRequest> im
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeleteByQueryRequest indices(String[] indices) {
|
public DeleteByQueryRequest indices(String... indices) {
|
||||||
this.indices = indices;
|
this.indices = indices;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue