code: public static Runnable closeAsRunnable(Closeable c)
      {
          return () -> {
              try {
                  c.close();
              } catch (IOException e) {
                  LOG.error("While closing " + c, e);
              }
          };
      }
docs: Create a {@link Runnable} that when run closes the provided {@link Closeable}.
  If an {@link IOException} is thrown while closing, it'll be caught and logged.
  @param c the closeable to close when the runnable is run
  @return a runnable that when run closes the closable