private boolean isTrailingSlashNeeded(String url) {
    if (url.toLowerCase().startsWith("jdbc:hive2://")) {
      return url.indexOf('/', "jdbc:hive2://".length()) < 0;
    }
    return false;
  }
This is an internal method used to create !connect command when -p option is used without
providing the password on the command line. Connect command returned should be ; separated
key-value pairs along with the url. We cannot use space separated !connect url user [password]
[driver] here since both password and driver are optional and there would be no way to
distinguish if the last string is password or driver

@param url connection url passed using -u argument on the command line
@param user username passed through command line
@param driver driver passed through command line -d option
@param stripPasswd when set to true generates a !connect command which strips the password for
         logging purposes
@return !connect command
beeline/src/java/org/apache/hive/beeline/BeeLine.java