// Copyright (c) 2006 Dustin Sallings <dustin@spy.net<

package net.spy.memcached.compat;

import java.io.Closeable;
import java.sql.Connection;

import net.spy.memcached.compat.log.Logger;
import net.spy.memcached.compat.log.LoggerFactory;

/**
 * CloseUtil exists to provide a safe means to close anything closeable.
 * This prevents exceptions from being thrown from within finally blocks while
 * still providing logging of exceptions that occur during close.  Exceptions
 * during the close will be logged using the spy logging infrastructure, but
 * will not be propagated up the stack.
 */
public final class CloseUtil {

	private static Logger logger=LoggerFactory.getLogger(CloseUtil.class);

    /**
     * Close a closeable.
     */
    public static void close(Closeable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (Exception e) {
                logger.info("Unable to close %s", closeable, e);
            }
        }
    }

    /**
     * Close a JDBC connection.
     */
    public static void close(Connection closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (Exception e) {
                logger.info("Unable to close %s", closeable, e);
            }
        }
    }

}

@@ -113,36 +113,8 @@
 ble;
-%0Aimport java.sql.Connection;
 %0A%0Aim
@@ -983,325 +983,6 @@
  %7D%0A%0A
-    /**%0A     * Close a JDBC connection.%0A     */%0A    public static void close(Connection closeable) %7B%0A        if (closeable != null) %7B%0A            try %7B%0A                closeable.close();%0A            %7D catch (Exception e) %7B%0A                logger.info(%22Unable to close %25s%22, closeable, e);%0A            %7D%0A        %7D%0A    %7D%0A%0A
 %7D%0A

Remove compat JDBC closing.