JDI TestScaffold does not support passing app arguments to the debuggee

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: 21
    • Component/s: core-svc
    • b25

      There seems to be some support for application args in parseArgs():

                  if (classNameParsed) {
                      // once classname is read, treat any other arguments as app arguments
                      argInfo.targetAppCommandLine += (arg + ' ');
                      continue;
                  }

      But before we get to parseArgs(), we have startup() adding the debuggee class name last.

          protected void startUp(String targetName) {
              List<String> argList = new ArrayList(Arrays.asList(args));
              argList.add(targetName);
              println("run args: " + argList);
              connect(argList.toArray(args));
              waitForVMStart();
          }

      It's assuming args[] only contains VM arguments. So that means what is suppose to be the first application argument ends up being taken as the class name by parseArgs(). I think startUp() needs to do something similar to parseArgs() and find the first argument that doesn't start with a '-', and insert targetName at that point.

      I need this support for a new test case I am writing for JDK-8308237.

            Assignee:
            Chris Plummer
            Reporter:
            Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: