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

Assorted improvements to source code model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 11
    • tools
    • None
    • b01

      There are several places where error recovery and related aspects could be improved, notably:
      -when parsing:
      ---
      class C {
           public <T>
      }
      ---
      the "public <T>" is represented by just an ErroneousTree node, with no embedded error trees. It would be more convenient if the ErroneousTree would contain a MethodTree representing the "public <T>".
      -when parsing:
      "class X "
      the end position of the ClassTree does not include the last space
      -when parsing:
      "class Test { FI fi = (s, "
      the "(s," gets parsed as parethesized expression, while it apparently must be some kind of a lambda expression
      -for code like:
      class Test { void test() { I i = s -> { }; } interface I { public void test(String s); } }
      Trees.getScope(<path-to '{ }' in s -> { }>) will return a Scope that is missing both "s" and "i".

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: