code: static boolean closeQuietlyIfAutoCommit(Connection connection) {
          try {
              if (connection != null && !connection.isClosed() && connection.getAutoCommit()) {
                  closeQuietly(connection);
                  return true;
              } else
                  return false;
          } catch (SQLException e) {
              throw new SQLRuntimeException(e);
          }
      }
docs: Closes a {@link Connection} only if the connection is in auto commit mode
  and logs exceptions without throwing. Does nothing if connection is null.
  
  @param connection