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

jvergara
30.38.2008 23f623c679f46d23696bdbf983667e24fa5f4b7e
Fix for issue 2889 (Java exception from dsconfig when answering ^D (ctrl-D) (EOT) in interactive mode)

The fix consists in not throwing a RuntimeException but a CLIException (the code assumed that there was a serious issue and did not consider this case). With the fix the behavior of MenuBuilder is similar to the one of LDAPConnectionConsoleInteraction.
1 files modified
10 ■■■■ changed files
opends/src/server/org/opends/server/util/cli/MenuBuilder.java 10 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/util/cli/MenuBuilder.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2007 Sun Microsystems, Inc.
 *      Portions Copyright 2007-2008 Sun Microsystems, Inc.
 */
package org.opends.server.util.cli;
@@ -276,13 +276,7 @@
        }
        // Get the user's choice.
        MenuCallback<T> choice;
        try {
          choice = app.readValidatedInput(promptMsg, validator);
        } catch (CLIException e) {
          // Should never happen.
          throw new RuntimeException(e);
        }
        MenuCallback<T> choice = app.readValidatedInput(promptMsg, validator);
        // Invoke the user's selected choice.
        MenuResult<T> result = choice.invoke(app);