code: @Override
    public void close() throws SQLException
    {
      logger.debug(" public void close()");
  
      if (isClosed)
      {
        // No exception is raised even if the connection is closed.
        return;
      }
  
      isClosed = true;
      try
      {
        if (sfSession != null)
        {
          sfSession.close();
          sfSession = null;
        }
  
        // make sure to close all created statements
        synchronized (openStatements)
        {
          for (Statement stmt : openStatements)
          {
            if (stmt != null && !stmt.isClosed())
            {
              if (stmt.isWrapperFor(SnowflakeStatementV1.class))
              {
                stmt.unwrap(SnowflakeStatementV1.class).close(false);
              }
              else
              {
                stmt.close();
              }
            }
          }
          openStatements.clear();
        }
      }
      catch (SFException ex)
      {
        throw new SnowflakeSQLException(
            ex.getCause(), ex.getSqlState(), ex.getVendorCode(), ex.getParams());
      }
    }
docs: Close the connection
  
  @throws SQLException failed to close the connection