Summary: | [assist] Wrong relevance for some proposals which are not compatible with the expected type | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | David Audel <david_audel> | ||||||||||
Component: | Core | Assignee: | Jay Arthanareeswaran <jarthana> | ||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | CC: | Olivier_Thomann | ||||||||||
Version: | 3.5 | Flags: | frederic_fusier:
review-
Olivier_Thomann: review+ kent_johnson: review+ |
||||||||||
Target Milestone: | 3.5 RC2 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Description
David Audel
2009-04-28 05:11:48 EDT
Created attachment 135101 [details]
Proposed patch
Swapped the parameters to the isBoxingCompatibleWith method invocation, which takes care of the incompatibility issue. Also modified the previous test cases to test the given cases.
The fix looks good but the modified regression test is not equivalent to the previous version. The previous has a base type (int) as expected type and the new a Class (Long) as expected type. Both tests would be useful, so i would keep both. Created attachment 135507 [details]
Patch with updated tests
There was an existing test case that had the expected type as a wrapper. I modified that to primitive. Now we have tests both with primitive and wrapper class as expected types. Hope this serves.
Created attachment 135535 [details]
Patch with updated tests
Retaining the older tests and their order as they are.
Comment on attachment 135535 [details]
Patch with updated tests
patch looks good
Frederic - Could you review the patch ? (In reply to comment #6) > Frederic - Could you review the patch ? > The change in CompletionEngine looks good, but the test seems wrong to me: 1) the int<->Integer auto-boxing should not have been removed 2) the introduced Long and Double classes are not declared in the test case, hence may it slightly different than the initial one... Created attachment 135757 [details]
Updated patch
Fred's suggestions included in the tests. Some of the redundant tests have been removed to keep the test simpler and at the same time retaining the Long as the expected type to keep the test case as close to the bug's description as possible.
Olivier, could review the last patch ? Kent, could you review the last patch ? +1. Patch looks good. Comment on attachment 135757 [details]
Updated patch
Patch looks good
Released for 3.5RC2 Tests updated CompletionTests_1_5#testCompletionWithUnboxing_1() Verified for 3.5RC2 using I20090521-2000. |