code: public static void closeWithWarning(Closeable c) {
          if (c != null) {
              try {
                  c.close();
              } catch (IOException e) {
                  LOG.warning("Caught exception during close(): " + e);
              }
          }
      }
docs: Close the Closeable. Logging a warning if any problems occur.
  
  @param c the thing to close