private static void close(Closeable c, Logger logger) {
    if (c != null) {
      try {
        c.close();
      } catch (IOException e) {
        if (logger != null) {
          logger.warn("IOException while closing Closeable", e);
        }
      }
    }
  }
Closes <code>c</code> logging any <code>IOException</code> via the specified <code>logger</code>.
ambari-server/src/main/java/org/apache/ambari/server/utils/Closeables.java