JDK-8205418 : Assorted improvements to source code model
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-06-20
  • Updated: 2023-11-30
  • Resolved: 2018-06-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b01Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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".
Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/12133a6e2613 User: jlahoda Date: 2018-06-29 08:45:20 +0000
29-06-2018