code: static void closeQuietly(Connection connection) {
          try {
              if (connection != null && !connection.isClosed()) {
                  connection.close();
                  log.debug("closed {}", connection);
              }
          } catch (SQLException e) {
              log.debug(e.getMessage(), e);
          } catch (RuntimeException e) {
              log.debug(e.getMessage(), e);
          }
      }
docs: Closes a {@link Connection} and logs exceptions without throwing. Does
  nothing if connection is null.
  
  @param connection