private static T completeAndGet()

in src/main/java/com/epam/eco/commons/kafka/AdminClientUtils.java [1125:1138]


    private static <T> T completeAndGet(KafkaFuture<T> future) {
        try {
            return future.get();
        } catch (InterruptedException ie) {
            throw new RuntimeException(ie);
        } catch (ExecutionException ee) {
            Throwable cause = ee.getCause();
            if (cause instanceof RuntimeException) {
                throw (RuntimeException)cause;
            } else {
                throw new RuntimeException(cause);
            }
        }
    }