Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8368975

Windows ProcessImpl.java has dead code

XMLWordPrintable

    • x86_64
    • windows

      A DESCRIPTION OF THE PROBLEM :
      The constructor of ProcessImpl has a structure like this:

      if (allowAmbiguousCommands) {
       ...
      } else {
                  boolean isShell = allowAmbiguousCommands ? isShellFile(executablePath)
                          : !isExe(executablePath);
                  cmdstr = createCommandLine(
                          // We need the extended verification procedures
                          isShell ? VERIFICATION_CMD_BAT
                                  : (allowAmbiguousCommands ? VERIFICATION_WIN32 : VERIFICATION_WIN32_SAFE),
                          quoteString(executablePath),
                          cmd);
      }

      These ternary expressions in the else block on allowAmbiguousCommands should be removed, since allowAmbiguousCommands is statically false there.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: