/*
 * Copyright 2018, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package io.spine.io;

import com.google.common.collect.FluentIterable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Closeable;
import java.io.IOException;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * A utility class working with I/O: streams, resources, etc.
 *
 * @author Alexander Litus
 */
public class IoUtil {

    /** Prevent instantiation of this utility class. */
    private IoUtil() {
    }

    /**
     * Closes passed closeables one by one.
     *
     * <p>Logs each {@link IOException} if it occurs.
     */
    public static void close(Closeable... closeables) {
        checkNotNull(closeables);

        close(FluentIterable.from(closeables));
    }

    /**
     * Closes passed closeables one by one.
     *
     * <p>Logs each {@link IOException} if it occurs.
     */
    @SuppressWarnings("ConstantConditions"/*check for null is ok*/)
    public static <T extends Closeable> void close(Iterable<T> closeables) {
        checkNotNull(closeables);

        try {
            for (T c : closeables) {
                if (c != null) {
                    c.close();
                }
            }
        } catch (IOException e) {
            if (log().isErrorEnabled()) {
                log().error("Exception while closing", e);
            }
        }
    }

    private static Logger log() {
        return LogSingleton.INSTANCE.value;
    }

    private enum LogSingleton {
        INSTANCE;
        @SuppressWarnings("NonSerializableFieldInSerializableClass")
        private final Logger value = LoggerFactory.getLogger(IoUtil.class);
    }
}

@@ -1032,57 +1032,8 @@
 o;%0A%0A
-import com.google.common.collect.FluentIterable;%0A
 impo
@@ -1139,16 +1139,41 @@
 ception;
+%0Aimport java.util.Arrays;
 %0A%0Aimport
@@ -1644,33 +1644,32 @@
 ll(closeables);%0A
-%0A
         close(Fl
@@ -1670,27 +1670,21 @@
 ose(
-FluentIterable.from
+Arrays.asList
 (clo

Simplify conversion