docs: @SuppressWarnings("deprecation")
  
  //#endif JAVA6
      public static Connection getConnection(String url,
              Properties info) throws SQLException {
  
          final HsqlProperties props = DatabaseURL.parseURL(url, true, false);
  
          if (props == null) {
  
              // supposed to be an HSQLDB driver url but has errors
              throw Util.invalidArgument();
          } else if (props.isEmpty()) {
  
              // is not an HSQLDB driver url
              return null;
          }
          props.addProperties(info);
  
          long timeout = DriverManager.getLoginTimeout();
  
          if (timeout == 0) {
  
              // no timeout restriction
              return new JDBCConnection(props);
          }
  
          String connType = props.getProperty("connection_type");
  
          if (DatabaseURL.isInProcessDatabaseType(connType)) {
              return new JDBCConnection(props);
          }
  
          /** @todo:  Better: ThreadPool? HsqlTimer with callback? */
          final JDBCConnection[] conn = new JDBCConnection[1];
          final SQLException[]   ex   = new SQLException[1];
          Thread                 t    = new Thread() {
  
              public void run() {
  
                  try {
                      conn[0] = new JDBCConnection(props);
                  } catch (SQLException se) {
                      ex[0] = se;
                  }
              }
          };
  
          t.start();
  
          final long start = System.currentTimeMillis();
  
          try {
              t.join(1000 * timeout);
          } catch (InterruptedException ie) {
          }
  
          try {
  
              // PRE:
              // deprecated, but should be ok, since neither
              // the HSQLClientConnection or the HTTPClientConnection
              // constructor will ever hold monitors on objects in
              // an inconsistent state, such that damaged objects
              // become visible to other threads with the
              // potential of arbitrary behavior.
              t.stop();
          } catch (Exception e) {
          }
  
          if (ex[0] != null) {
              throw ex[0];
          }
  
          if (conn[0] != null) {
              return conn[0];
          }
  
          throw Util.sqlException(ErrorCode.X_08501);
      }