package org.securegraph.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

public class CloseableUtils {
    private static final Logger LOGGER = LoggerFactory.getLogger(CloseableUtils.class);

    public static void closeQuietly(Closeable closeable) {
        try {
            closeable.close();
        } catch (IOException ex) {
            LOGGER.warn("Failed to close", ex);
        }
    }
}

@@ -311,24 +311,87 @@
 loseable) %7B%0A
+        if (closeable == null) %7B%0A            return;%0A        %7D%0A
         try 

check for null in closeQuietly