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

kenneth_suter
17.45.2007 26a4e0b26ed4eaceb4b6ff4dcb1e4564a7980f57
added guard to prevent runtime error in case ApplicationException.Type is null
1 files modified
33 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/QuickSetupCli.java 33 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/QuickSetupCli.java
@@ -34,6 +34,8 @@
import org.opends.quicksetup.event.ProgressUpdateEvent;
import org.opends.quicksetup.i18n.ResourceProvider;
import java.lang.reflect.Type;
/**
 * Controller for managing the execution of a CliApplication.
 */
@@ -143,23 +145,28 @@
        ApplicationException ue = cliApp.getException();
        if (ue != null)
        {
          switch (ue.getType())
          {
          case FILE_SYSTEM_ERROR:
            returnValue = ERROR_ACCESSING_FILE_SYSTEM;
            break;
          ApplicationException.Type type = ue.getType();
          if (type != null) {
            switch (type)
            {
            case FILE_SYSTEM_ERROR:
              returnValue = ERROR_ACCESSING_FILE_SYSTEM;
              break;
          case STOP_ERROR:
            returnValue = ERROR_STOPPING_SERVER;
            break;
            case STOP_ERROR:
              returnValue = ERROR_STOPPING_SERVER;
              break;
          case BUG:
            returnValue = BUG;
            break;
            case BUG:
              returnValue = BUG;
              break;
          default:
            default:
              returnValue = UNKNOWN;
              break;
            }
          } else {
            returnValue = UNKNOWN;
            break;
          }
        }
        else