Get settings on empty node fails with ArrayIndexOutOfBoundsException[0]
fixes #2676
This commit is contained in:
parent
b8cc8e56c4
commit
915019587d
|
@ -73,7 +73,8 @@ public class RestGetSettingsAction extends BaseRestHandler {
|
|||
MetaData metaData = response.getState().metaData();
|
||||
|
||||
if (metaData.indices().isEmpty()) {
|
||||
channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indices[0]))));
|
||||
String indexName = indices.length == 0 ? "_all" : indices[0];
|
||||
channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indexName))));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue