| Summary: | [1.7] Incorrect source range for ParameterizedType in case of Diamond | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Deepak Azad <deepakazad> | ||||
| Component: | Core | Assignee: | Satyam Kandula <satyam.kandula> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | amj87.iitr, jarthana, markus.kell.r, Olivier_Thomann, satyam.kandula, srikanth_sankaran | ||||
| Version: | 3.7 | Flags: | Olivier_Thomann:
review+
|
||||
| Target Milestone: | 3.7.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I will take a look at this. Created attachment 196725 [details]
Proposed fix + regression test
Olivier, Can you please review the patch? Patch looks good. I added a comment to explain why '<' can be found as a token. Committed to BETA_JAVA7 branch. Thanks Olivier. Verified |
------------------------------------------------------------- package p; import java.util.ArrayList; import java.util.List; class Diamond { void foo() { List<String> a= new ArrayList<>(); } } ------------------------------------------------------------- The ParameterizedType node for 'ArrayList<>' has source range as [123,10], the correct range should be [123,11]. This works correctly for 'ArrayList<String>', i.e. when the type parameter is available. (I observed this in AST view plug-in. You will need to get the source of the plug-in from BETA_JAVA7 branch from the cvs location mentioned in http://www.eclipse.org/jdt/ui/astview/index.php.)