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

JShell: SourceCodeAnalysis splits code with array initialiazer incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • tools
    • b147
    • Verified

      SourceCodeAnalysis splits code with array declaration incorrectly.

      Example:
      int[] m = {1, 2}, n = new int[0];
      int i;

      SourceCodeAnalysis is expected to split these two lines, but it does not. If "{1, 2}" is replaced with "new int..." or removed, the code is split as expected.

      ------

      Also handle, as incomplete:

           int m = 0,

           Map<String,

            rfield Robert Field (Inactive)
            aeremeev Andrei Eremeev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: