diff --git a/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java b/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java index ac2f82136c7..81620ec8a7c 100644 --- a/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java +++ b/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java @@ -22,6 +22,7 @@ package org.elasticsearch.rest; import org.apache.lucene.search.spell.LevensteinDistance; import org.apache.lucene.util.CollectionUtil; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.CheckedConsumer; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Setting; @@ -125,14 +126,7 @@ public abstract class BaseRestHandler extends AbstractComponent implements RestH * the request against a channel. */ @FunctionalInterface - protected interface RestChannelConsumer { - /** - * Executes a request against the given channel. - * - * @param channel the channel for sending the response - * @throws Exception if an exception occurred executing the request - */ - void accept(RestChannel channel) throws Exception; + protected interface RestChannelConsumer extends CheckedConsumer { } /**