Remove HighLevelRestClient from CCSDuelIT (#102222)

This commit is contained in:
Ignacio Vera 2023-11-16 12:18:03 +01:00 committed by GitHub
parent 5a01af3600
commit c579ab2d4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 370 additions and 383 deletions

View file

@ -8,12 +8,20 @@
package org.elasticsearch.core;
import java.util.function.Consumer;
import java.util.Objects;
/**
* A {@link Consumer}-like interface which allows throwing checked exceptions.
* A {@link java.util.function.Consumer}-like interface which allows throwing checked exceptions.
*/
@FunctionalInterface
public interface CheckedConsumer<T, E extends Exception> {
void accept(T t) throws E;
default CheckedConsumer<T, E> andThen(CheckedConsumer<? super T, E> after) throws E {
Objects.requireNonNull(after);
return (T t) -> {
accept(t);
after.accept(t);
};
}
}