mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
05.11.2007 607db4ead9220ca87d996bec891536368c39f941
According to the usage of the graphical install and uninstall commands, the additional options are ignored if we do not specify the --cli option.  However currently if the user does not specify --cli and adds one of the other options, the usage is displayed.  With these modifications, usage is only displayed when user asks for it or when the user provides invalid options in CLI mode (which is more consistent with what is specified in the usage).
2 files modified
29 ■■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java 25 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -68,9 +68,6 @@
   */
  protected boolean shouldPrintUsage() {
    boolean printUsage = false;
    if (!isCli() && args.length > 0) {
      printUsage = true;
    } else {
      if ((args != null) && (args.length > 0)) {
        for (String arg : args) {
          if (arg.equalsIgnoreCase("-H") ||
@@ -79,7 +76,6 @@
          }
        }
      }
    }
    return printUsage;
  }
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
@@ -94,31 +94,6 @@
  /**
   * {@inheritDoc}
   */
  protected boolean shouldPrintUsage() {
    boolean displayUsage = false;
    if ((args != null) && (args.length > 0)) {
      if (!isCli()) {
        if (args.length > 0) {
          if (args.length == 2) {
            /*
             * Just ignore the -P argument that is passed by the setup command
             * line.
             */
            if (!args[0].equals("-P")) {
              displayUsage = true;
            }
          } else {
            displayUsage = true;
          }
        }
      }
    }
    return displayUsage;
  }
  /**
   * {@inheritDoc}
   */
  protected void guiLaunchFailed(String logFileName) {
    if (logFileName != null)
    {