| Summary: | Wrongly reports addition of first type parameter to a generic method | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Markus Keller <markus.kell.r> |
| Component: | API Tools | Assignee: | Markus Keller <markus.kell.r> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, Lars.Vogel, markus.kell.r, Vikas.Chandra |
| Version: | 4.6 | Flags: | Vikas.Chandra:
review+
|
| Target Milestone: | 4.6 M2 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/52960 https://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=4f5169287422584658daa624ce779ba77b45c5c7 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 465292 | ||
|
Description
Markus Keller
New Gerrit change created: https://git.eclipse.org/r/52960 The main fix is in ClassFileComparator line 676, where the compatible IDelta.TYPE_PARAMETERS flag is used instead of IDelta.TYPE_PARAMETER. The latter is correctly reported as error in DeltaProcessor#isMethodCompatible(IDelta). The other changes in ClassFileComparator fix the IDelta#getKey() for methods. element1.getName() is not a correct key, which resulted in problem markers with wrong source ranges ([-1, 1]) for the errors in bug 465292. To see this part of the fix in action, e.g. apply this incompatible addition of a second type parameter to org.eclipse.e4.ui.workbench.modeling.EModelService: Old: public <T> List<T> findElements(MUIElement searchRoot, String id, Class<T> clazz, List<String> tagsToMatch); New: public <T, M extends MUIElement> List<T> findElements(M searchRoot, String id, Class<T> clazz, List<String> tagsToMatch); Fix works fine and all test case passes. Can you update the license year before committing. Gerrit change https://git.eclipse.org/r/52960 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=4f5169287422584658daa624ce779ba77b45c5c7 Thanks Markus. @Vikas, I updated the copyright headers for Markus. verified in Version: Neon (4.6) Build id: I20150914-2000 |