Summary: | DiagnoseParser has unreachable code | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | minor | ||||||
Priority: | P3 | CC: | Olivier_Thomann | ||||
Version: | 3.4 | ||||||
Target Milestone: | 3.5 M1 | ||||||
Hardware: | Other | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Stephan Herrmann
2008-06-08 13:16:41 EDT
This code has bug, it should be 'j == repair.distance && k == repair.misspellIndex && isBetterSymbol(symbol, repair.symbol)'. This code is useless because isBetterSymbol() return always false. I think that this code has been released by accident. If my memory is good, i investigated how to replace 'interface' by 'class' in syntax error diagnosis and this code is a part of these investigation. So we should remove this useless code or we should add the complete support to replace 'interface' by 'class' in diagnosis (we should also replace non terminal symbols like 'InterfaceHeader' by 'ClassHeader' and do the same for other constructs like the 'enum'). Created attachment 107583 [details]
Proposed fix
This patch remove the useless code.
Released for 3.5M1. Verified for 3.5M1 using I20080805-1307 |