| Summary: | [1.8][dom ast] thrown Exceptions with Type Annotations should have malformed nodes for AST level less than 8 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Manoj N Palat <manoj.palat> | ||||||
| Component: | Core | Assignee: | Jay Arthanareeswaran <jarthana> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | jarthana, markus.kell.r, srikanth_sankaran | ||||||
| Version: | 4.3 | Flags: | jarthana:
review?
(manoj.palat) |
||||||
| Target Milestone: | BETA J8 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 232524 [details]
Fix with test
Simple fix to mark the exception Name as MALFORMED when there are annotations found in the type reference.
Manoj, can you glance over the patch once, please? (In reply to comment #2) > Manoj, can you glance over the patch once, please? Jay: 1) Patch looks good. 2) Experimenting with the test case, it can be seen that the same issue applies in return types, and parameters ie for < 1.8, the ASTNode is not signalled as MALFORMED. If possible, we should address in the same bug or raise another bug for the same. (In reply to comment #3) > (In reply to comment #2) > > Manoj, can you glance over the patch once, please? > > Jay: > 1) Patch looks good. > > 2) Experimenting with the test case, it can be seen that the same issue > applies in return types, and parameters ie for < 1.8, the ASTNode is not > signalled as MALFORMED. If possible, we should address in the same bug or > raise another bug for the same. Actually, when I switch the AST level in the ASTView, I do see that return types and types of arguments are marked as malformed. Manoj, can you please confirm? (In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > Manoj, can you glance over the patch once, please? > > > > Jay: > > 1) Patch looks good. > > > > 2) Experimenting with the test case, it can be seen that the same issue > > applies in return types, and parameters ie for < 1.8, the ASTNode is not > > signalled as MALFORMED. If possible, we should address in the same bug or > > raise another bug for the same. > > Actually, when I switch the AST level in the ASTView, I do see that return > types and types of arguments are marked as malformed. > > Manoj, can you please confirm? Jay: Please ignore my comment 2 regarding return types and parameters as I did not consider the availability of SE7 annotations at that point. Patch is good to commit without any changes. Thanks for reviewing, Manoj. Fix released via commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=4eeaf0d0e03ab922557bc9369f948328bc88b0fc |
Created attachment 229840 [details] Test case to reproduce See java.io.@NonNull EOFException node in the attached test case using ast viewer: thrownExceptions are converted to Name in ast level prior to 8. These nodes should have malformed flag set (somewhere) in case of presence of type annotations in the thrown exceptions.