Summary: | [1.5][compiler] Inappropriate usage of HashSet | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Andrey Pavlenko <andrey.a.pavlenko> | ||||||||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||||
Severity: | normal | ||||||||||||||
Priority: | P3 | Flags: | Olivier_Thomann:
review+
jerome_lanneluc: review+ |
||||||||||||
Version: | 3.2 | ||||||||||||||
Target Milestone: | 3.3 RC2 | ||||||||||||||
Hardware: | PC | ||||||||||||||
OS: | Windows XP | ||||||||||||||
Whiteboard: | |||||||||||||||
Attachments: |
|
Description
Andrey Pavlenko
2007-05-21 11:12:19 EDT
It is using a HashMap. Ignore previous comment. Specific invocations are indeed stored into a HashSet, which I presume is what you were referring too. Problem is that LinkedHashSet was only introduced in 1.4, and this part of compiler cannot use 1.4 specific additions. Yes, you are right. So, maybe it's reasonable to use LinkedList instead of HashSet? Created attachment 67990 [details]
Proposed patch
Proposed alternate solution using a list instead.
Adjusted GenericTypeTest#test0985. Created attachment 68019 [details]
Patch including test change
Created attachment 68031 [details]
Better patch
Avoid allocating list of size 1
Olivier - pls review Andrey - are you able to apply the patch, and assess that it effectively addresses the Harmony issue ? Kent - pls review Created attachment 68073 [details]
Even better patch
Removed unnecessary check for size==1, since lists are only created when size > 1.
Phillipe, the patch is seems to be ok, now the tests pass on Harmony. Thanks. Created attachment 68103 [details]
Even better patch 2
Using a TypeBinding[] instead of a List.
+1 No sign of Kent - Jerome pls review. Released for 3.3RC2. Fixed Verified for 3.3RC2 using I20070524-0010 |