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

jvergara
11.44.2008 1766a4a7a901795e0bd6a433fd9b6aa9487f6323
Fix for issue 3049 (./uninstall --cli -a --no-prompt exit status 0 (success) despite errors reported)

Throw an UserDataException when the user must provide authentication and we are in non-interactive mode without the forceOnError flag. This way we display the error message describing the problem, the alternatives in terms of arguments that can be used and the whole usage of the command line with a longer description of the arguments we propose to use.
1 files modified
10 ■■■■ changed files
opends/src/guitools/org/opends/guitools/uninstaller/UninstallCliHelper.java 10 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/uninstaller/UninstallCliHelper.java
@@ -1048,9 +1048,11 @@
   * @return <CODE>true</CODE> if we could connect
   * to the remote servers and all the presented certificates were accepted and
   * <CODE>false</CODE> otherwise.
   * @throws UserDataException if were are not in interactive mode and not in
   * force on error mode and the operation must be stopped.
   */
  private boolean updateUserUninstallDataWithRemoteServers(
      UninstallUserData userData)
      UninstallUserData userData) throws UserDataException
  {
    boolean accepted = false;
    boolean interactive = parser.isInteractive();
@@ -1166,7 +1168,7 @@
        }
        else
        {
          println(
          throw new UserDataException(null,
              ERR_UNINSTALL_ERROR_UPDATING_REMOTE_NO_FORCE.get(
                  parser.getSecureArgsList().adminUidArg.getLongIdentifier(),
                  ToolConstants.OPTION_LONG_BINDPWD,
@@ -1200,9 +1202,11 @@
   * Returns <CODE>true</CODE> if the user accepts all the problems encountered
   * and <CODE>false</CODE> otherwise.
   * @param userData the user data.
   * @throws UserDataException if there is an error with the information
   * provided by the user when we are in non-interactive mode.
   */
  private boolean handleTopologyCache(TopologyCache cache,
      UninstallUserData userData)
      UninstallUserData userData) throws UserDataException
  {
    boolean returnValue;
    boolean stopProcessing = false;