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

jshell feedback is incorrect when creating method with array varargs parameter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11, 14, 16, 17
    • Fix Version/s: 17
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      A DESCRIPTION OF THE PROBLEM :
      The jshell feedback, such as "created method test", is incorrect when creating a method which has an array varargs parameter, e.g. `int[]... ints`.
      Instead of showing `[]...` as parameter type only `[]` is shown.

      Note that when using either only multi-dimensional arrays, e.g. `String[][]`, or varargs with non array component type, e.g. `String...`, the feedback is correct.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Use the following code in jshell:
      void test(int[]... ints) {}

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      It should say:
      > created method test(int[]...)
      ACTUAL -
      It says:
      > created method test(int[])

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jlahoda Jan Lahoda
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: