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

JShell API: no way for the jshell tool to report exit status to provider

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b33
    • CPU:
      generic
    • OS:
      generic

      Description

      jdk.internal.jshell.tool.JShellToolProvider, which is run by the launcher, reports exit code per Tool.run().

      However, the jdk.jshell.tool.JavaShellToolBuilder API declares run() as a void method, providing no way to exit code from the tool. These occur when:

      (1) The tool fails during launch (e.g. missing load file)

      (2) The user explicitly exits with an exit code (JDK-8185840)

      Solution:
      A new version of the run method is needed in the builder which returns the exit code.
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rfield Robert Field
                Reporter:
                rfield Robert Field
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: